Index: examples/koen/pcb-rnd-xml/msl/tmp/msl.xml =================================================================== --- examples/koen/pcb-rnd-xml/msl/tmp/msl.xml (revision 32048) +++ examples/koen/pcb-rnd-xml/msl/tmp/msl.xml (nonexistent) @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -50000,-49556.1102957943,-49112.2205915886,-48668.3308873829,-48224.4411831772,-47780.5514789715,-47336.6617747658,-46892.7720705601,-46448.8823663544,-46004.9926621487,-45561.102957943,-45117.2132537373,-44673.3235495316,-44229.4338453259,-43785.5441411202,-43341.6544369145,-42897.7647327088,-42453.8750285031,-42009.9853242974,-41566.0956200917,-41122.205915886,-40678.3162116803,-40234.4265074746,-39790.5368032689,-39346.6470990632,-38902.7573948575,-38458.8676906518,-38014.9779864461,-37571.0882822404,-37127.1985780347,-36683.308873829,-36239.4191696233,-35795.5294654176,-35351.6397612119,-34907.7500570062,-34463.8603528005,-34019.9706485948,-33576.0809443891,-33132.1912401834,-32688.3015359777,-32244.411831772,-31800.5221275663,-31356.6324233606,-30912.7427191549,-30468.8530149492,-30024.9633107435,-29581.0736065378,-29137.1839023322,-28693.2941981265,-28249.4044939208,-27805.5147897151,-27361.6250855094,-26917.7353813037,-26473.845677098,-26029.9559728923,-25586.0662686866,-25142.1765644809,-24698.2868602752,-24254.3971560695,-23810.5074518638,-23366.6177476581,-22922.7280434524,-22478.8383392467,-22034.948635041,-21591.0589308353,-21147.1692266296,-20703.2795224239,-20259.3898182182,-19815.5001140125,-19371.6104098068,-18927.7207056011,-18483.8310013954,-18039.9412971897,-17596.051592984,-17152.1618887783,-16708.2721845726,-16264.3824803669,-15820.4927761612,-15376.6030719555,-14932.7133677498,-14488.8236635441,-14044.9339593384,-13601.0442551327,-13157.154550927,-12713.2648467213,-12269.3751425156,-11825.4854383099,-11381.5957341042,-10937.7060298985,-10493.8163256928,-10049.9266214871,-9606.0369172814,-9162.1472130757,-8718.25750887,-8274.3678046643,-7830.4781004586,-7386.5883962529,-6942.6986920472,-6498.8089878415,-6054.91928363581,-5611.02957943011,-5167.13987522441,-4723.25017101871,-4279.36046681301,-3835.47076260731,-3391.58105840161,-2947.69135419591,-2503.80164999022,-2059.91194578452,-1616.02224157882,-1172.13253737312,-794.36389819011,-542.518138734771,-374.620965764545,-262.689517117728,-175.126344745152,-87.5631723725759,0,87.5631723725759,175.126344745152,262.689517117728,374.620965764545,542.518138734771,794.36389819011,1172.13253737312,1616.02224157882,2059.91194578452,2503.80164999022,2947.69135419591,3391.58105840161,3835.47076260731,4279.36046681301,4723.25017101871,5167.13987522441,5611.02957943011,6054.91928363581,6498.8089878415,6942.6986920472,7386.5883962529,7830.4781004586,8274.3678046643,8718.25750887,9162.1472130757,9606.0369172814,10049.9266214871,10493.8163256928,10937.7060298985,11381.5957341042,11825.4854383099,12269.3751425156,12713.2648467213,13157.154550927,13601.0442551327,14044.9339593384,14488.8236635441,14932.7133677498,15376.6030719555,15820.4927761612,16264.3824803669,16708.2721845726,17152.1618887783,17596.051592984,18039.9412971897,18483.8310013954,18927.7207056011,19371.6104098068,19815.5001140125,20259.3898182182,20703.2795224239,21147.1692266296,21591.0589308353,22034.948635041,22478.8383392467,22922.7280434524,23366.6177476581,23810.5074518638,24254.3971560695,24698.2868602752,25142.1765644809,25586.0662686866,26029.9559728923,26473.845677098,26917.7353813037,27361.6250855094,27805.5147897151,28249.4044939208,28693.2941981265,29137.1839023322,29581.0736065379,30024.9633107436,30468.8530149493,30912.7427191549,31356.6324233606,31800.5221275663,32244.411831772,32688.3015359777,33132.1912401834,33576.0809443891,34019.9706485948,34463.8603528005,34907.7500570062,35351.6397612119,35795.5294654176,36239.4191696233,36683.308873829,37127.1985780347,37571.0882822404,38014.9779864461,38458.8676906518,38902.7573948575,39346.6470990632,39790.5368032689,40234.4265074746,40678.3162116803,41122.205915886,41566.0956200917,42009.9853242974,42453.8750285031,42897.7647327088,43341.6544369145,43785.5441411202,44229.4338453259,44673.3235495316,45117.2132537373,45561.102957943,46004.9926621487,46448.8823663544,46892.7720705601,47336.6617747658,47780.5514789715,48224.4411831772,48668.3308873829,49112.2205915886,49556.1102957943,50000 - -9000,-8570.02884905882,-8140.05769811765,-7710.08654717647,-7280.11539623529,-6850.14424529411,-6420.17309435294,-5990.20194341176,-5560.23079247058,-5130.25964152941,-4700.28849058823,-4270.31733964705,-3840.34618870587,-3410.3750377647,-2980.40388682352,-2550.43273588234,-2120.46158494117,-1690.49043399999,-1274.89680037576,-955.209389895586,-709.295997218529,-520.131849005408,-374.620965764545,-262.689517117728,-175.126344745152,-87.5631723725759,0,87.5631723725759,175.126344745152,262.689517117728,374.620965764545,520.131849005408,709.295997218529,955.209389895586,1274.89680037576,1690.49043399999,2116.98232042296,2543.47420684592,2969.96609326889,3396.45797969185,3822.94986611482,4249.44175253779,4675.93363896075,5102.42552538372,5528.91741180669,5955.40929822965,6381.90118465262,6808.39307107559,7234.88495749855,7661.37684392152,8087.86873034448,8514.36061676745,8940.85250319042,9367.34438961338,9793.83627603635,10220.3281624593,10646.8200488823,11062.4136825065,11382.1010929867,11628.0144856637,11817.1786338769,11962.6895171177,12074.6209657645,12220.1318490054,12409.2959972185,12655.2093898956,12974.8968003758,13390.490434,13838.1086437647,14285.7268535294,14733.3450632941,15180.9632730588,15628.5814828235,16076.1996925882,16523.8179023529,16971.4361121176,17419.0543218823,17866.6725316471,18314.2907414118,18761.9089511765,19209.5271609412,19657.1453707059,20104.7635804706,20552.3817902353,21000 - 0,63.5,127,190.5,254,336.55,443.865,583.3745,764.73685,1000.507905,1307.0102765,1705.46335945,2122.731679725,2540 - - - Index: examples/koen/pcb-rnd-xml/msl/MSL_NotchFilter.m =================================================================== --- examples/koen/pcb-rnd-xml/msl/MSL_NotchFilter.m (revision 32048) +++ examples/koen/pcb-rnd-xml/msl/MSL_NotchFilter.m (nonexistent) @@ -1,92 +0,0 @@ -% -% Tutorials / MSL_NotchFilter -% -% Describtion at: -% http://openems.de/index.php/Tutorial:_Microstrip_Notch_Filter -% -% Tested with -% - Matlab 2011a / Octave 4.0 -% - openEMS v0.0.33 -% -% (C) 2011-2015 Thorsten Liebig - -close all -clear -clc - -%% setup the simulation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -physical_constants; -unit = 1e-6; % specify everything in um -MSL_length = 50000; -MSL_width = 600; -substrate_thickness = 254; -substrate_epr = 3.66; -stub_length = 12e3; -f_max = 7e9; - -%% setup FDTD parameters & excitation function %%%%%%%%%%%%%%%%%%%%%%%%%%%% -FDTD = InitFDTD(); -FDTD = SetGaussExcite( FDTD, f_max/2, f_max/2 ); -BC = {'PML_8' 'PML_8' 'MUR' 'MUR' 'PEC' 'MUR'}; -FDTD = SetBoundaryCond( FDTD, BC ); - -%% setup CSXCAD geometry & mesh %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -CSX = InitCSX(); -resolution = c0/(f_max*sqrt(substrate_epr))/unit /50; % resolution of lambda/50 -mesh.x = SmoothMeshLines( [0 MSL_width/2+[2*resolution/3 -resolution/3]/4], resolution/4, 1.5 ,0 ); -mesh.x = SmoothMeshLines( [-MSL_length -mesh.x mesh.x MSL_length], resolution, 1.5 ,0 ); -mesh.y = SmoothMeshLines( [0 MSL_width/2+[-resolution/3 +resolution/3*2]/4], resolution/4 , 1.5 ,0); -mesh.y = SmoothMeshLines( [-15*MSL_width -mesh.y mesh.y stub_length+[-resolution/3 +resolution/3*2]/4 15*MSL_width+stub_length], resolution, 1.3 ,0); -mesh.z = SmoothMeshLines( [linspace(0,substrate_thickness,5) 10*substrate_thickness], resolution ); -CSX = DefineRectGrid( CSX, unit, mesh ); - -%% substrate -CSX = AddMaterial( CSX, 'RO4350B' ); -CSX = SetMaterialProperty( CSX, 'RO4350B', 'Epsilon', substrate_epr ); -start = [mesh.x(1), mesh.y(1), 0]; -stop = [mesh.x(end), mesh.y(end), substrate_thickness]; -CSX = AddBox( CSX, 'RO4350B', 0, start, stop ); - -%% MSL port -CSX = AddMetal( CSX, 'PEC' ); -portstart = [ mesh.x(1), -MSL_width/2, substrate_thickness]; -portstop = [ 0, MSL_width/2, 0]; -[CSX,port{1}] = AddMSLPort( CSX, 999, 1, 'PEC', portstart, portstop, 0, [0 0 -1], 'ExcitePort', true, 'FeedShift', 10*resolution, 'MeasPlaneShift', MSL_length/3); - -portstart = [mesh.x(end), -MSL_width/2, substrate_thickness]; -portstop = [0 , MSL_width/2, 0]; -[CSX,port{2}] = AddMSLPort( CSX, 999, 2, 'PEC', portstart, portstop, 0, [0 0 -1], 'MeasPlaneShift', MSL_length/3 ); - -%% Filter-stub -start = [-MSL_width/2, MSL_width/2, substrate_thickness]; -stop = [ MSL_width/2, MSL_width/2+stub_length, substrate_thickness]; -CSX = AddBox( CSX, 'PEC', 999, start, stop ); - -%% write/show/run the openEMS compatible xml-file -Sim_Path = 'tmp'; -Sim_CSX = 'msl.xml'; - -[status, message, messageid] = rmdir( Sim_Path, 's' ); % clear previous directory -[status, message, messageid] = mkdir( Sim_Path ); % create empty simulation folder - -WriteOpenEMS( [Sim_Path '/' Sim_CSX], FDTD, CSX ); -CSXGeomPlot( [Sim_Path '/' Sim_CSX] ); -RunOpenEMS( Sim_Path, Sim_CSX ); - -%% post-processing -close all -f = linspace( 1e6, f_max, 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([-40 2]); -