You are looking at the HTML representation of the XML format.
HTML is good for debugging, but is unsuitable for application use.
Specify the format parameter to change the output format.
To see the non HTML representation of the XML format, set format=xml.
See the complete documentation, or API help for more information.
<?xml version="1.0"?>
<api>
  <query-continue>
    <allpages gapcontinue="Running_Live_Simulations_with_Circuit_Animation_or_Virtual_Instruments" />
  </query-continue>
  <query>
    <pages>
      <page pageid="4000" ns="0" title="Reflection &amp; Transmission Characteristics of Periodic Structures">
        <revisions>
          <rev contentformat="text/x-wiki" contentmodel="wikitext" xml:space="preserve">[[Image:FDTD140(1).png|thumb|320px|Setting a custom plane wave source plane.]]
==Defining a Periodic Plane Wave Source in EM.Tempo==

Using a plane wave source to excite a periodic structure in [[EM.Tempo]], you can model frequency selective surfaces, electromagnetic band-gap (EBG) structures, metamaterials, etc. Exciting periodic structures with plane wave sources requires careful attention. [[EM.Tempo]]'s FDTD simulation engine uses the direct spectral domain FDTD or constant transverse wavenumber method for analyzing periodic structures. In this technique, instead of a plane wave box, one defines a plane wave surface parallel to the X-Y plane. If the plane wave source illuminates the periodic unit cell from the top (90&amp;deg; &lt; &amp;theta; &lt; 180&amp;deg;), the excitation surface is placed above the structure's bounding box. If the plane wave source illuminates the periodic unit cell from the bottom up (0&amp;deg; &lt; &amp;theta; &lt; 90&amp;deg;), the excitation surface is placed below the structure's bounding box. In either case, the plane wave must intercept the excitation surface before hitting the unit cell's physical structure. It is highly recommended that you accept [[EM.Tempo]]'s default settings for the plane wave box of periodic structures. Nevertheless, you can change the location of the excitation surface if you wish. To do so, you have to open the '''Plane Wave Dialog'''. In the Excitation Box section of the dialog, select the '''Size: Custom''' option. Only the '''Z Coordinate''' of '''Corner 1''' is available for editing. The rest of the coordinates are enforced by the periodic domain. You can enter the incidence angles '''Theta''' and '''Phi''' in degrees. For periodic structures, only the '''TM&lt;sub&gt;z&lt;/sub&gt;''' and '''TE&lt;sub&gt;z&lt;/sub&gt;''' polarization options are available.

One of the pitfalls of the direct spectral FDTD method is the possibility of horizontal resonances, which may lead to indefinite oscillation or even divergence of field values during the time marching loop. This happens in the case of oblique plane wave incidence when &amp;theta; &gt; 0&amp;deg;. [[EM.Cube]]'s FDTD engine automatically detects such cases and avoids those resonances by shifting the modulation frequency of the modulated Gaussian pulse waveform away from the resonant frequency. However, in some cases, the size of oscillations may still remain large after a large number of time steps. Occasionally, a late-time diverging behavior may appear. To avoid situations like these, it is highly recommended that you place a time-domain field probe above your structure and monitor the temporal field behavior during the time marching loop as shown in the figure below.

==Calculating Reflection &amp; Transmission Coefficients==

At the end of the FDTD simulation of a periodic structure with plane wave excitation, the reflection and transmission coefficients of the structure are calculated and saved into two complex data files with '''.CPX''' file extensions. These coefficients behave like the S&lt;sub&gt;11&lt;/sub&gt; and S&lt;sub&gt;21&lt;/sub&gt; [[parameters]] of a two-port network. You can think of the upper half-space as Port 1 and the lower half-space as Port 2 of this network. The reflection and transmission (R/T) coefficients can be plotted on 2D graphs in '''EM.Grid '''similar to the scattering [[parameters]]. You can plot them from the Navigation Tree. To do so, right click on the '''Periodic Characteristics''' item in the '''Observables''' section of the Navigation Tree and select '''Plot Reflection Coefficients''' or '''Plot Transmission Coefficients'''. The complex data files are also listed in [[EM.Cube]]'s data manager. To open data manager, click the '''Data Manager''' [[Image:data_manager_icon.png]] button of the '''Simulate Toolbar''' or select '''Simulate &gt; Data Manager''' from the menu bar or right click on the '''Data Manager''' item of the Navigation Tree and select Open Data Manager... from the contextual menu or use the keyboard shortcut '''Ctrl+D'''. Select any data file by selecting its row in the table and then click the '''Plot''' button to plot the graph in EM.Grid.

{{Note|It is very important to keep in mind that only in the case of normal incidence does [[EM.Cube]] compute the reflection and transmission coefficients over the entire specified bandwidth of the project. At oblique incidences when &amp;theta; &gt; 0, the computed R/T coefficients after the discrete Fourier transformation are valid only at the center frequency of the project for the given value of the incident &amp;theta;&lt;sub&gt;0&lt;/sub&gt; angle. In other words, the computed R/T coefficients at all the other frequencies away from the center frequency correspond to different values of the incident &amp;theta; angle. As a result, [[EM.Cube]] only saves the reflection and transmission coefficients at the center frequency into the output data files &quot;reflection_coefficient.CPX&quot; and &quot;transmission_coefficient.CPX&quot;.}}

==Special Periodic FDTD Simulation Types==

[[Image:FDTD144.png|thumb|250px| [[EM.Tempo]]'s Dispersion Sweep Settings dialog.]]
The '''Dispersion Sweep '''option of the Simulation Mode dropdown list performs a sweep of constant k&lt;sub&gt;l&lt;/sub&gt; wavenumber values. This is a specialized sweep for the constant transverse wavenumber method that [[EM.Cube]]'s [[FDTD Module]] uses to model periodic structures illuminated by a plane wave source. The real advantage of a dispersion sweep is that through a one-dimensional sweep of k&lt;sub&gt;li&lt;/sub&gt;, you can find the reflection and transmission coefficients for all combinations of frequency f&lt;sub&gt;j&lt;/sub&gt; and incident angle &amp;theta;&lt;sub&gt;j&lt;/sub&gt; such that (2&amp;pi;/c) . f&lt;sub&gt;j&lt;/sub&gt;. sin &amp;theta;&lt;sub&gt;j&lt;/sub&gt; = k&lt;sub&gt;li&lt;/sub&gt;. This provides a complete picture of the dispersion behavior of your periodic structure. The sweep data can be graphed as a wavenumber-frequency intensity plot (also known as beta-k diagram) that projects the eigenvalues of the periodic structure. The horizontal axis represents the constant transverse wavenumber k&lt;sub&gt;l&lt;/sub&gt; (or beta). The vertical axis represents frequency. Sometimes, the free space wave number k&lt;sub&gt;0&lt;/sub&gt; = (2&amp;pi;/c).f is used as the vertical axis, hence, the term beta-k diagram. However, [[EM.Cube]] plots frequency vs. wavenumber. Both the horizontal and vertical axes start from 0 and extend to f&lt;sub&gt;max&lt;/sub&gt; and k&lt;sub&gt;l,max&lt;/sub&gt;, respectively, where f&lt;sub&gt;max&lt;/sub&gt; = f&lt;sub&gt;0&lt;/sub&gt; + &amp;Delta;f/2, and &amp;Delta;f is the specified bandwidth of the project. For this sweep option you have to specify the number of wavenumber samples. Note that the dispersion sweep is run for a fixed given value of the plane wave incident angle &amp;phi; as specified in [[FDTD Module]]'s Plane Wave Dialog.

{{isoimg|FDTD148.png|A typical dispersion diagram of a periodic structure}}

== Exciting Periodic Structures Using Plane Waves in EM.Picasso==

When a periodic structure is excited using a plane wave source, it acts as a periodic surface that reflects or transmits the incident wave. You can model frequency selective surfaces, electromagnetic band-gap structures and metamaterials in this way. [[EM.Cube]] calculates the reflection and transmission coefficients of periodic surfaces or planar structures. If you run a single plane wave simulation, the reflection and transmission coefficients are reported in the Output Window at the end of the simulation. Note that these periodic characteristics depend on the polarization of the incident plane wave. You set the polarization (TMz or TEz) in the '''Plane Wave Dialog''' when defining your excitation source. In this dialog you also set the values of the incident '''Theta''' and '''Phi''' angles.

At the end of the planar MoM simulation of a periodic structure with plane wave excitation, the reflection and transmission coefficients of the structure are calculated and saved into two complex data files called &amp;quot;reflection.CPX&amp;quot; and &amp;quot;transmission.CPX&amp;quot;. These coefficients behave like the S&lt;sub&gt;11&lt;/sub&gt; and S&lt;sub&gt;21&lt;/sub&gt; [[parameters]] of a two-port network. You can think of the upper half-space as Port 1 and the lower half-space as Port 2 of this network. As a result, you can run an adaptive sweep of periodic structures with a plane wave source just like projects with gap or probe sources. The reflection and transmission (R/T) coefficients can be plotted in EM.Grid on 2D graphs similar to the S [[parameters]]. You can plot them from the Navigation Tree. To do so, right click on the '''Periodic Characteristics''' item in the '''Observables''' section of the Navigation Tree and select '''Plot Reflection Coefficients''' or '''Plot Transmission Coefficients'''. The complex data files are also listed in [[EM.Cube]]'s '''Data Manager''', where you can view or plot them.

{{Note|In the absence of any finite traces or embedded objects in the project workspace, [[EM.Cube]] computes the reflection and transmission coefficients of the layered background structure of your project.}}

[[Image:PMOM102.png|thumb|400px|A periodic planar layered structure with slot traces excited by a normally incident plane wave source.]]

You learned earlier how to use [[EM.Cube]]'s powerful, adaptive frequency sweep utility to study the frequency response of a planar structure. Adaptive frequency sweep uses rational function interpolation to generate smooth curves of the scattering [[parameters]] with a relatively small number of full-wave simulation runs in a progressive manner. Therefore, you need a port definition in your planar structure to be able to run an adaptive frequency sweep. This is clear in the case of an infinite periodic phased array, where your periodic unit cell structure must be excited using either a gap source or a probe source. You run an adaptive frequency sweep of an infinite periodic phased array in exactly the same way to do for regular, aperiodic, planar structures.

[[EM.Cube]]'s Planar Modules also allows you to run an adaptive frequency sweep of periodic surfaces excited by a plane wave source. In this case, the planar MoM engine calculates the reflection and transmission coefficients of the periodic surface. Note that you can conceptually consider a periodic surface as a two-port network, where Port 1 is the top half-space and Port 2 is the bottom half-space. In that case, the reflection coefficient R is equivalent to S&lt;sub&gt;11&lt;/sub&gt; parameter, while the transmission coefficient T is equivalent to S&lt;sub&gt;21&lt;/sub&gt; parameter. This is, of course, the case when the periodic surface is illuminated by the plane wave source from the top half-space, corresponding to 90°&amp;lt; &amp;theta; = 180°. You can also illuminate the periodic surface by the plane wave source from the bottom half-space, corresponding to 0° = &amp;theta; &amp;lt; 90°. In this case, the reflection coefficient R and transmission coefficient T are equivalent to S&lt;sub&gt;22&lt;/sub&gt; and S&lt;sub&gt;12&lt;/sub&gt; [[parameters]], respectively. Having these interpretations in mind, [[EM.Cube]] enables the &amp;quot;'''Adaptive Frequency Sweep'''&amp;quot; option of the '''Frequency Settings Dialog''' when your planar structure has a periodic domain together with a plane wave source.

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[[Image:BACK.png|40px]] '''[[EM.Tempo | Back to EM.Tempo Main Page]]'''

{{FDTD Details}}</rev>
        </revisions>
      </page>
      <page pageid="4159" ns="0" title="Running HDMR Simulations in EM.Cube">
        <revisions>
          <rev contentformat="text/x-wiki" contentmodel="wikitext" xml:space="preserve">[[Image:Variable30.png|thumb|400px|Choosing HDMR  sweep as the simulation mode in the Simulation Run dialog.]] 
== An Overview of HDMR Method ==

In the HDMR method, you run successive evaluations of a given function of one or more [[variables]] for a number of [[variables]] samples. Then you create an optimal monomial surface representation of the computed data as a function of those [[variables]]. The resulting simplified function is characterized by a finite number of monomial coefficients. Therefore, its computation is more faster and computationally efficient than the original functions.     

==Defining the HDMR Variables ==

[[Image:Variable32.png|thumb|500px|The HDMR Settings dialog.]]
To define the HDMR [[variables]], follow the procedure below:
* Open the Simulation '''Run Dialog''' of most of [[EM.Cube]]'s computational modules and select the '''HDMR''' option from the '''Simulation Mode''' dropdown list. 
* Click the '''Settings''' button next to the simulation mode dropdown list to open up the HDMR Settings Dialog. 
* On the left side of the &quot;[[Variables]]&quot; section of the dialog you see the &quot;'Independent [[Variables]] Table&quot;, which lists all the available independent [[variables]] of your project. Select an independent variable from the table and use the Right Arrow (--&gt;) button of the dialog to move it to the &quot;HDMR [[Variables]] Table&quot;. 
* Before moving the variable to the new location, the &quot;Define [[Optimization]] Variable Dialog&quot; opens up, where you have to define the start and stop values of the variable (ignore the precision). 
* Once you finish the definition of an HDMR variable, its name and attributes are added to the HDMR [[Variables]] List. 

Note that you can change your mind and remove an HDMR variable from the list. To do so, select its name or row from the list and use the {{key|Left Arrow (&lt;--)}} button to move it back to the Independent Variables Table. You can also change the attribute values of an HDMR variable after it has been defined. Select the variable from the list and click the {{key|Edit}} button of the dialog. 

==Defining the HDMR Models ==

To define an HDMR model, follow the procedure below:

* click the '''Add''' button in the &quot;Model Definition&quot; section of the dialog to open up the '''Add HDMR Model Dialog'''. At the bottom of this dialog, you can see a list of all the available [[EM.Cube]] standard output [[parameters]]. This list may vary depending on the types of sources and observables you have defined in your project. 
* Choose a name for your HDMR model. Make sure that this name is unique and does not conflict with the existing data file names in your project's folder.   
* Type in any mathematical expressions in the boxes labeled '''Expression'''. If you select the name of any standard parameter in the table and double-click on it, it will be reflected in the expression box. 
* You can have different names for your HDMR model and its model file with an '''.HDM''' file extension. But it is recommended that you choose the same name. 
Select one of the available options in the dropdown list labeled '''Logical Operator'''. The default operator is '''&amp;quot;== (Equal To)&amp;quot;'''.
* Once the definition of your HDMR model is complete, click the '''OK''' button on the dialog to close it and return to the HDMR Settings dialog. 

You will see your new HDMR added to the HDMR Model List table. You can modify a model definition using the {{key|Edit}} button of this dialog. You can also define more than one HDMR model at a time. Such models will be generated using the same simulation runs. However, it is recommended not to generate unrelated models together. In the example below, we have defined an HDMR model called &quot;Resistance&quot; for the real part of the Z11 [[parameters]] of a dipole antenna as a function of its length defined by an independent variable &quot;L&quot;.  

&lt;table&gt;
&lt;tr&gt;
&lt;td&gt; [[Image:Variable31.png|thumb|300px|Defining an HDMR model involving Z parameters.]] &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

[[Image:Variable34.png|thumb|550px|EM.Cube's Model dialog showing a the HDMR model &quot;Resistance.HDM&quot; generated by EM.Tempo's FDTD simulation engine.]] 
== Running an HDMR Sweep ==

After you define all of your HDMR [[variables]] and model(s), close the HDMR Settings dialog to return to the simulation Run dialog. When you click the {{key|Run}} button of the Simulation Run dialog to start the HDMR sweep process, an Output Window pops up that reports the various stages of the sweep loop and displays the progress or percentage of completion. After the sweep process is finished, an HDMR file with a '''.HDM''' file extension is added to your project's folder, which contains all the monomial coefficients of your HDMR model. You can see your new HDMR model [[EM.Cube]]'s Models Dialog, which you can open by clicking the '''Models''' button [[File:Models_icon.png]] of the Simulate Toolbar or selecting '''Menu &gt; Simulate &gt; Models...''' or using the keyboard shortcut {{key|Ctrl+L}}.

Note that once you generate an HDMR model, you can use it everywhere in [[EM.Cube]] just like any standard or library function or like a functional, tabular or Python model. In the above example, the syntax of your new custom function is Resistance(L) or Resistance(x). As you can see from the figure on the right, the current value of &quot;Resistance&quot; is about 115.2&amp;Omega; because the argument of your HDMR function, i.e. &quot;L&quot;, has a current value of 150mm, which can be verified in the [[Variables]] dialog.

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[[Image:Back_icon.png|40px]] '''[[Parametric_Modeling,_Sweep_%26_Optimization | Back to Parametric Modeling, Sweep &amp; Optimization]]'''</rev>
        </revisions>
      </page>
    </pages>
  </query>
</api>