Changes

EM.Picasso

20,753 bytes removed, 12:15, 3 June 2015
You couple two or more sources using the '''Port Definition Dialog'''. To do so, you need to change the default port assignments. First, delete all the ports that are to be coupled from the Port List of the dialog. Then, define a new port by clicking the '''Add''' button of the dialog. This opens up the Add Port dialog, which consists of two tables: '''Available''' sources on the left and '''Associated''' sources on the right. A right arrow ('''-->''') button and a left arrow ('''<--''') button let you move the sources freely between these two tables. You will see in the "Available" table a list of all the sources that you deleted earlier. You may even see more available sources. Select all the sources that you want to couple and move them to the "Associated" table on the right. You can make multiple selections using the keyboard's '''Shift''' and '''Ctrl''' keys. Closing the Add Port dialog returns you to the Port Definition dialog, where you will now see the names of all the coupled sources next to the name of the newly added port.
{{Note|It is your responsibility to set up coupled ports and coupled [[Transmission Lines|[[Transmission Lines|[[Transmission Lines|[[Transmission Lines|[[Transmission Lines|[[Transmission Lines|transmission lines]]]]]]]]]]]] properly. For example, to excite the desirable odd mode of a coplanar waveguide (CPW), you need to create two rectangular slots parallel to and aligned with each other and place two gap sources on them with the same offsets and opposite polarities. To excite the even mode of the CPW, you use the same polarity for the two collocated gap sources. Whether you define a coupled port for the CPW or not, the right definition of sources will excite the proper mode. The couple ports are needed only for correct calculation of the port characteristics.}}
[[File:PMOM51(2).png|800px]]
Figure: [[EM.Cube]]'s [[Animation]] Controls dialog.
 
=== Running a Parametric Sweep ===
 
Parametric sweep is [[EM.Cube]]'s most versatile sweep type. During a parametric sweep, the values of one or more sweep [[variables]] are varied over their specified ranges, and the planar MoM simulation is run for each combination of variable samples. If you define two or more sweep [[variables]], the process will then involve nested sweep loops that follow the order of definition of the sweep [[variables]]. The topmost sweep variable in the list will form the outermost nested loop, and the sweep variable at the bottom of the list will form the innermost nested loop. Note that you can alternatively run either a frequency sweep or an angular sweep as parametric sweep, whereby the project frequency or the angles of incidence of a plane wave source are designated as sweep [[variables]]. Unlike [[optimization]] which will be discussed later, parametric sweeps are simple and straightforward and do not required careful advance planning.
 
Before you can run a parametric sweep, first you have to define one or more [[variables]] in your [[EM.Cube]] project. A variable is a mathematical entity that has a numeric value. This numeric value can be changed at your discretion at any time. You can define a variable either directly as a number or as a mathematical expression that may involve other previously defined [[variables]]. Even in the latter case, an "expression" variable has a numeric value at any time. You can designate almost any numeric quantity or parameter in [[EM.Cube]] as a variable. Or alternatively, you can associate a variable with almost anything in [[EM.Cube]]. This includes all the geometrical properties of CAD objects like coordinates, rotation angles, dimensions, etc. as well as material properties of object groups and background structure, source [[parameters]], project frequency, mesh density, and unit cell periods in the case of a periodic structure. You can define a variable either in a formal manner using [[EM.Cube]]'s Variable Dialog or directly from the project workspace or from the Navigation Tree. In the former "formal" option, first you open the [[Variables]] Dialog by clicking the '''[[Variables]]''' [[File:variable_icon_tn.png]] button of the '''Simulate Toolbar''' or selecting '''Menu > Simulate > [[Variables]]...'''or using the keyboard shortcut '''Ctrl+B'''. By default, the variable list is initially empty. To add a new variable, click the '''Add''' button to open the "Add Variable Dialog". Choose a '''Name''' for your new variable. In the box labeled '''Definition''', define your new variable either as an independent variable with a numeric value or as a dependent variable using a mathematical expression that involves previously defined [[variables]].
 
[[File:PMOM146(1).png]]
 
Figure 1: [[EM.Cube]]'s [[Variables]] dialog.
 
[[File:PMOM145(2).png]]
 
Figure 2: Defining a new independent variable.
 
Once you finish the definition of a new variable, its name and syntax (Definition) are added to the "Variable List". You can also see the '''Current Value''' of every variable at any time in the Variable as dialog. Note that at this stage, you have simply defined one or more [[variables]], but you have not yet associated them with actual objects or project properties. Wherever you see a numeric value for a parameter in a dialog, e.g. the length of a rect strip object in its property dialog, you can replace the numeric value with a variable name or a mathematical expression using the names of the currently available [[variables]]. From this moment on, that parameter or quantity becomes tied up with the associated variable. This means that every time you change the value of that variable, the value of the associated object parameter or project property will change accordingly. You can change the value of a variable directly from the [[Variables]] Dialog using the '''Edit''' button or indirectly during a parametric sweep. In the former case, you have to click the '''Update''' button of the [[Variables]] dialog to make the changes effective. Alternatively, you can define new [[variables]] directly from the property dialogs of CAD objects, trace and object set dialogs, stack-up dialog or many other [[EM.Cube]] dialogs. If you replace the numeric value of a parameter with a text-string name that has not already been defined as a variable, then a new variable by that name is created and added to the "Variable List". The numeric value of the associated parameter at the time of replacement is taken as the "current Value" of the newly created variable. In this way, you can easily and quickly define [[variables]] associated with the design [[parameters]] that you intend to sweep in your project.
 
In a parametric sweep, you can vary the values of one or more "Independent" project [[variables]]. In other words, you designate one or more independent [[variables]] as sweep [[variables]] and specify how they should vary (be sampled) during the sweep simulation process. In [[EM.Cube]] you can define three types of sweep [[variables]]: '''Uniform''', '''Discrete''' and '''Random'''. Each sweep [[variables]] can be defined as one of these three types, and you can mix sweep [[variables]] of different types in a multivariable parametric sweep. A uniform sweep variable is defined by a "Start" and "End" value and is incremented by a predetermined "Step" value during a sweep. A discrete sweep variable is defined by a discrete set of values and takes on these values by the order of their list during a sweep. A random sweep variable, on the other hand, takes on random values during a sweep according to a specified probability distribution. [[EM.Cube]] currently offers two random distribution types. '''Uniform Distribution''' is defined by "Minimum" and "Maximum" values, while '''Normal (Gaussian) Distribution''' is defined by a "Mean" and "Standard Deviation". You need to specify the "Number of Samples" for both random variable types.
 
To define sweep [[variables]] and run a parametric sweep, open the '''Simulation Run Dialog''', and select the '''Parametric Sweep''' option from the dropdown list labeled '''Simulation Mode'''. When you choose the parametric sweep option, the '''Settings''' button next to the simulation mode dropdown list becomes enabled. Clicking this button opens the '''Parametric Sweep Settings''' dialog. The '''Sweep [[Variables]] List''' is initially empty. On the left side of the dialog you see the "'''Independent [[Variables]] Table'''", which lists all the available independent [[variables]] of your project. Select an independent variable from the table and use the right arrow ('''-->''') button of the dialog to move it to the Sweep [[Variables]] List. Before moving the variable to the new location, the "Define Sweep Variable Dialog" opens up, where you have to define the attributes of your new sweep variable. In this dialog, you need to choose the type of the sweep variable using the three radio buttons labeled '''Uniform''', '''Discrete''' and '''Random'''. Depending on your choice, the proper section of the dialog becomes enabled, where you can define the range of your sweep variable and other relevant [[parameters]].
 
Once you finish the definition of a sweep variable, its name and attributes are added to the Sweep [[Variables]] List. Note that you can change your mind and remove a sweep variable from the list. To do so, select its name or row from the list and use the left arrow (<--) button to move it back to the Independent [[Variables]] Table. You can also change the type or relevant values of a sweep variable after it has been defined. Select the variable and click the '''Edit''' button of the dialog. As mentioned earlier, the order of the sweep [[variables]] in the list determined the structure of the nested sweep loops in a multivariable sweep process. When you have two or more sweep [[variables]] in the list, you can change their order using the '''Move Up''' and '''Move Down''' buttons.
 
The Parametric Sweep Settings dialog also features another useful button labeled '''Dry Run''', which runs a "fake" sweep [[animation]]. During a dry run, the sweep [[variables]] are varied sample by sample and all of their associated [[parameters]] in the project workspace are updated at each run. However, the simulation engine is not called during a dry run, and no numerical computations take place at all. Also, the Variable Dry Run dialog appears on the screen which shows the changing values of all the [[variables]] at all times. This dialog works in a similar way as the [[Animation]] Controls Dialog described earlier. You can change the speed of the updates or control them manually using the motion buttons. The dry run process continues forever until to stop it by clicking the close (X) button of the Dry Run dialog of simply hitting the keyboard's '''Esc Key'''. At ach update of a dry run, you can see how the CAD objects in your planar structure change. This is very useful to inspect the integrity of your structure and your defined [[variables]] before an actual simulation run. If you run a dry run while [[EM.Cube]] is in the mesh view mode, then the planar mesh of your structure is updated for each combination of the sweep variable samples during the dry run process. Once you are satisfied with the choice and definition of your sweep [[variables]], close the Parametric Sweep Settings dialog to return to the Simulation Run dialog, where you can start the planar MoM parametric sweep simulation by clicking the '''Run''' button.
 
[[File:PMOM148.png]]
 
Figure 3: [[EM.Cube]]'s Parametric Sweep Settings dialog.
 
[[File:PMOM147.png]]
 
Figure 4: Defining the type and range of a sweep variable.
 
[[File:PMOM149.png]]
 
Figure 5: [[EM.Cube]]'s Variable Dry Run dialog.
 
=== Optimizing Planar Structures ===
 
[[Optimization]] is a process in which the values of one or more [[variables]] are varied in a systematic way until one or more design objectives are met. The design objectives are typically defined based on the output simulation data and are mathematically translated into an error (objective) function that is to be minimized. Running a successful [[optimization]] requires careful advance planning. First you have to make sure that your [[optimization]] problem does have a valid solution within the range of your [[optimization]] [[variables]]. In other words, the design objectives must be achievable for at least one combination of the [[optimization]] variable values within the specified ranges. Otherwise, the [[optimization]] process will not converge or will exhaust the maximum allowed number of iteration cycles and exit unsuccessfully.
 
An [[optimization]] process in [[EM.Cube]] involves several steps as follows:
 
# Define project (design) [[variables]] and designate one or more [[optimization]] [[variables]] with respective ranges.
# Define project (design) objectives using a combination of standard and custom output [[parameters]].
# (Optional but Highly Recommended) Run a parametric sweep of your [[optimization]] [[variables]] within their specified ranges and see if your design objectives have any chance of ever being met.
# Choose the [[optimization]] algorithm type and set its relevant [[parameters]].
# If you have more than one design objective, define weights for the goals.
# Run the [[optimization]] process and wait until it is completed.
# Examine the optimal values of the participating [[variables]] and the updated values of their associated [[parameters]].
# Run an analysis using the optimal variable values and validate the [[optimization]] results.
 
A design objective is a logical expression that consists of two mathematical expressions separated by one of the logical operators: ==, <, <=, > or >=. These are called the left-hand-side (LHS) and right-hand-side (RHS) mathematical expressions and both must have computable numerical values. They may contain any combination of numbers, constants, variables, standard or custom output parameters as well as EM.Cube's legitimate functions. Objectives that involve the logical operator "'''=='''" are regarded a "'''Goals'''". The RHS expression of a goal is usually chosen to be a number, which is often known as the "'''Target Value'''". In the logical expression of a goal, one can bring the two RHS and LHS expressions to one side establish an equality of the form "(LHS - RHS) == 0". Numerically speaking, this is equivalent to minimizing the quantity | LHS - RHS |. During an [[optimization]] process, all the project goals are evaluated numerically and they are used collectively to build an error (objective) function whose value is tried to be minimized. Objectives that involve "non-Equal" logical operators are regarded a "'''Constraints'''". Unlike goals which lead to minimizable numerical values, constraints are rather conditions that should be met while the error function is being minimized.
 
To define an objective, open the '''Objectives Dialog''' either by clicking the '''Objectives''' [[File:objective_icon.png]] button of the '''Simulate Toolbar''', or by selecting '''Menu > Simulate > Objectives...''' from the Menu Bar, or using the keyboard shortcut '''Ctrl+J'''. The objectives list is initially empty. To add a new objective, click the '''Add''' button to open up the '''Add Objective Dialog'''. At the bottom of this dialog, you can see a list of all the available [[EM.Cube]] output [[parameters]] including both standard and custom output [[parameters]]. This list may vary depending on the types of sources and observables that you have already defined in your project. You can enter any mathematical expressions in the two boxes labeled '''Expression 1''' and '''Expression 2'''. The Available Output Parameter List simply helps you remember the syntax of these [[parameters]]. You should also select one of the available options in the dropdown list labeled '''Logical Operator'''. The default operator is '''"=== (Equal To)"'''. As soon as you finish the definition of an objective, its full logical expression is added to the Objective List. You can always modify the project objectives after they have been created. Select a row in the Objective List and click the '''Edit''' button of the dialog and change the expressions or the logical operator. You can also remove an objective from the list using the '''Delete''' button.
 
[[File:PMOM151.png]]
 
Figure 1: [[EM.Cube]]'s Objectives dialog.
 
[[File:PMOM150.png]]
 
Figure 2: Defining a new objective using a list of available output [[parameters]].
 
Just like sweep [[variables]], [[optimization]] [[variables]] are chosen from the list of available independent [[variables]] already defined in your project. Dependent [[variables]] do not participate directly in an [[optimization]] process, although their values continuously change in accordance with their associated independent [[variables]]. In fact, dependent [[variables]] let you envision and formulate very complicated constrained [[optimization]] scenarios.
 
To define [[optimization]] [[variables]] and perform an [[optimization]], open the '''Simulation Run Dialog''', and select the '''[[Optimization]]''' option from the dropdown list labeled '''Simulation Mode'''. When you choose the [[optimization]] option, the '''Settings''' button next to the simulation mode dropdown list becomes enabled. Clicking this button opens the '''[[Optimization]] Settings''' dialog. This is a large dialog with several distinct sections. In the section titled "'''[[Optimization]] Algorithm'''", you can choose one of [[EM.Cube]]'s three currently available optimizers: '''Powell's Method''', '''Basic Genetic Algorithm''' and '''Fast Pareto Genetic Algorithm'''. For all three optimizers you have to set the '''Maximum Number of Iterations''', which has a default value of 5. For the two genetic algorithms, basic GA and Pareto, you also need to set the '''Population Size''' as a multiple of 5. The default population size is 50.
 
In the [[Variables]] section of the dialog, you designate the [[optimization]] [[variables]]. This is very similar to how you assign sweep [[variables]] in a parametric sweep as discussed earlier. The '''[[Optimization]] [[Variables]] List''' is initially empty. On the left side of the dialog you see the "'''Independent [[Variables]] Table'''", which lists all the available independent [[variables]] of your project. Select an independent variable from the table and use the right arrow ('''-->''') button of the dialog to move it to the [[Optimization]] Variable List. Before moving the variable to the new location, the "Define [[Optimization]] Variable Dialog" opens up, where you have to set the '''Minimum'''and '''Maximum'''values of your new [[optimization]] variable. Once you finish the definition of an [[optimization]] variable, its name and Min/Max values are added to the [[Optimization]] [[Variables]] List. Note that you can change your mind and remove an [[optimization]] variable from the list. To do so, select its name or row from the list and use the left arrow (<--) button to move it back to the Independent [[Variables]] Table. You can also change the Min/Max values of an [[optimization]] variable after it has been defined. Select the variable and click the '''Edit''' button of the dialog to change those value. If you check the box labeled "''' Update [[Variables]] with Optimal Values'''" (as it is always checked by default), [[EM.Cube]] will automatically replace the definitions (and current values) of all the participating [[optimization]] [[variables]] in the '''[[Variables]] Dialog''' with their computed optimal values and will update all the associated [[parameters]] in the project workspace. This, of course, will happen only if the [[optimization]] process successfully converges. Sometimes, the [[optimization]] process may get trapped in a local minimum. You may encounter this problem primarily when using the Powell method. You will notice that the values of the [[optimization]] [[variables]] soon get "saturated" and remain constant afterwards. [[EM.Cube]] lets you exit such local traps if you check the box labeled "'''Exit Local Min Trap'''". There is a box underneath, labeled '''Tolerance''', that becomes enabled and has a default value of 0.01. This means that exit a local minimum trap when the value of the [[optimization]] variable stays within 1% error after successive [[optimization]] runs. In that case, the [[optimization]] process ends forcibly before having achieved convergence.
 
Finally, in the section titled "'''Error Function'''" of the [[Optimization]] Dialog you build the mathematical form of your objective function. Keep in mind that [[EM.Cube]]'s [[optimization]] is a numerical process. Therefore, you can rarely minimize your error function to zero literally. You need to set a "'''Maximum Error'''" value for the objective function, which terminates the process as "converged" when it is reached. The default value of Maximum Error is 0.01. In two tables labeled '''Goals''' and '''Constraints''', you see a list of all the project objectives that have been split between the two tables according to their types. Many [[optimization]] problems involve a single, straightforward goal. Others may involve multiple goals subject to multiple constraints. In those cases, you have assign weights to your goals and constraints. If all of your goals and constraints have the same level of importance, then you assign equal weights to them. You can do this easily by clicking the '''Distribute''' button of the dialog. Or you may assign individual weights manually. However, you have to make sure that all the weight adds up to unity. The objective function of the [[optimization]] problem is constructed from the goals and constraints using the specified weights. This can be done in two different ways: as '''Linearly Weighted Goals''' or as '''Mean Square Weighted Goals.''' You set these options from the dropdown list labeled '''Weight Type'''. Once you are satisfied with the choice and definition of your [[optimization]] [[variables]], [[optimization]] algorithms and goals weights, close the [[Optimization]] dialog to return to the Simulation Run dialog, where you can start the planar MoM [[optimization]] process by clicking the '''Run''' button.
 
[[File:PMOM152.png]]
 
Figure 3: [[EM.Cube]]'s [[Optimization]] dialog.
== Periodic Planar Structures & Antenna Arrays ==
28,333
edits