Professional Documents
Culture Documents
www.coventor.com
Version 6.3
Coventor, Inc.
This manual and its accompanying materials are licensed to the user for the period set forth in the applicable license agreement,
subject to termination of the license by Coventor, Inc. at any time. The manual at all times remains the property of Coventor, Inc.,
or third parties from whom Coventor, Inc. has obtained a licensing right. The information contained in this manual including but
not limited to the ideas, concepts and know-how, is proprietary, confidential and trade secret to Coventor, Inc. or such third parties
and the information contained therein shall be maintained as proprietary, confidential, and trade secret to Coventor, Inc. or to such
third parties. The information in this manual shall not be copied or reproduced in any form whatsoever, nor is any information in
this manual to be disclosed to anyone other than an authorized representative of the user’s employer who is contractually obligated
not to disclose same, without express prior written consent of Coventor, Inc. The user of this manual and the computer program(s)
referred to herein retains full control over and is solely responsible for the mechanical design of the user’s equipment, machinery,
systems, and products. COVENTOR, INC. MAKES NO WARRANTIES OF ANY KIND, INCLUDING THE WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE EQUIPMENT, MACHIN-
ERY, SYSTEMS, AND PRODUCTS, DERIVED OR RESULTING HEREUNDER, AND THE USER ASSUMES ALL RISKS
AND LIABILITY FOR RESULTS OBTAINED BY THE MANUFACTURING, USE OR IMPLEMENTATION OF THE COM-
PUTER PROGRAMS(S) DESCRIBED HEREIN, WHETHER USED SINGLY OR IN COMBINATION WITH OTHER
DESIGNS OR PRODUCTS. Coventor shall not be liable for any incidental, indirect, special, consequential, or punitive damages.
Coventor makes no warranty that the equipment, machinery, systems, and products derived or resulting hereunder will not infringe
the claims of domestic or foreign patents and further does not warrant against infringement by reason of the user, thereof in combi-
nation with other designs, products, or materials or in the operation of any process. User shall protect, indemnify and hold harm-
less Coventor of and from any loss, cost, damage (including attorney’s fees) or expense arising from any claim that is any way
associated with the computer programs(s) described in this manual. Data presented in examples do not necessarily reflect actual
test results and should not be used as design criteria.
By acceptance of this manual, the user agrees to the above conditions and further agrees that this manual will not be exported (or
re-exported from a country of installation), directly or indirectly, separately or as part of a system, without user or user’s employer,
at its own cost, first obtaining all licenses from the United States Department of Commerce and any other appropriate agency of
the United States Government as may be required by law.
© Coventor, Inc., 2018.
All rights reserved. No part of this work may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system without
prior permission in writing from Coventor, Inc. Information in this document is subject to change without notice.
CoventorWare includes software developed by the University of California, Berkeley and its contributors.
CoventorWare is enhanced with Visualization Software from Tecplot, Inc. of Bellevue, Washington, USA.
CoventorWare and the associated documentation incorporate portions of Abaqus/CAE and its associated documentation under
license from SIMULIA, Inc. Abaqus is a registered trademark of SIMULIA, Inc.
Coventor, CoventorWare, MEMS+, CoSolveEM, CoventorWare ANALYZER, CoventorWare DESIGNER, MemElectro, Damp-
ingMM, MemMech, and WHAT’S NEXT, AND NEXT, AND NEXT are registered trademarks of Coventor, Inc. Cary, NC.
DXF is a trademark of Autodesk, Inc.
FLEXnet is a registered trademark of Globetrotter Software, Inc.
I-deas is a trademark of UGS.
MATLAB(r). (c) 1984 - 2018 The MathWorks, Inc.
Permalloy is a registered trademark of B&D Industrial & Mining Services, Inc.
Tecplot is a registered trademark of Tecplot, Inc.
Cadence, Verilog and Verilog-XL are registered trademarks of Cadence Design Systems, Inc.
Excel and Windows 7 are registered trademarks of Microsoft Corporation.
X Window System is a trademark of Massachusetts Institute of Technology.
MUMPs is a registered trademark of MEMSCAP, Inc.
VdmTools is proprietary and copyrighted software of Visual Kinematics, Inc.
All other trademarks or registered trademarks belong to their respective holders.
Contact us at www.coventor.com
Doc Ver 6.3 Rev A Compatible with MEMS+ version 6.3
Table of Contents
M
1.2.1: Material Database.................................................................................................... U1-3
1.2.2: Process Editor.......................................................................................................... U1-3
1.2.3: Component Library .................................................................................................. U1-3
1.2.4: Innovator .................................................................................................................. U1-3
1.2.5: Simulator.................................................................................................................. U1-3
1.2.6: Scene3D .................................................................................................................. U1-4
M
Setting Property Values for Simulation .................................................................. U2-29
Hints for Remembering Properties and Methods .................................................. U2-31
2.3.6: Recursive Runs for Analyses................................................................................. U2-32
2.3.7: Accessing Results.................................................................................................. U2-32
Result Matrices ...................................................................................................... U2-32
Plotting Results...................................................................................................... U2-34
Plotting Harmonic Results ..................................................................................... U2-34
2.3.8: Saving to and Loading from a File ......................................................................... U2-35
Individual Scene3D Files ....................................................................................... U2-35
Full Analysis Session............................................................................................. U2-36
2.3.9: Displaying Individual Component Force Contributions .......................................... U2-37
get.......................................................................................................................... U2-39
sum ........................................................................................................................ U2-39
Transient Analysis ................................................................................................. U2-40
2.3.10: Stopping a Simulation .......................................................................................... U2-41
With a Keyboard Shortcut...................................................................................... U2-41
Specifying a Simulation Stop Event....................................................................... U2-41
M
Components .......................................................................................................... U2-88
Connectors / Port Connections.............................................................................. U2-89
2.8.8: Simulator................................................................................................................ U2-89
Analyses ................................................................................................................ U2-89
Result .................................................................................................................... U2-90
Datasets ................................................................................................................ U2-90
Force Balance Contributions ................................................................................. U2-90
SystemMatrices ..................................................................................................... U2-91
2.8.9: Utilities ................................................................................................................... U2-91
2.8.10: Access to CoventorWare ..................................................................................... U2-92
M
Section 5: Troubleshooting
5.1: MEMS+..................................................................................................... U5-1
5.1.1: Replaying .py File Locks Application ....................................................................... U5-1
5.1.2: Changes Lost When MEMS+ Loses License........................................................... U5-1
5.1.3: Cannot Change Value of Exposed Variable ............................................................ U5-1
5.6: Scene3D.................................................................................................U5-14
5.6.1: New Result File Will Not Load Automatically ......................................................... U5-14
5.6.2: Loading a Result File Crashes Scene3D ............................................................... U5-14
Section 6: Appendix
6.1: Keyboard Shortcuts................................................................................U6-1
1.1: Overview
MEMS+ is an integrated platform for MEMS and MEMS+IC design, simulation, and product development. MEMS
devices typically comprise a MEMS sensing or actuation device and integrated electronics. But in conventional
MEMS design, there is a disconnect between MEMS and IC design flows, which leads to long development cycles,
high costs, and minimal design reuse. MEMS+ enables MEMS designers to assemble a behavioral model of a MEMS
device in a 3-D graphical user interface and simulate it in MEMS+ Simulator, the Mathworks MATLAB, the Math-
works Simulink, or Cadence Virtuoso. The MEMS designers can easily hand off MEMS+ behavioral models to their
counterparts in system architecture and IC design who require MEMS behavioral models to complete system-level or
M
implementation-level simulations. MEMS+ behavioral models are superior to hand-crafted models because they
accurately capture the MEMS behavior, including multiple degrees of freedom, and they are parameterized with
respect to geometric, process, and environmental variables chosen by the MEMS designer.
MEMS+ allows users to assemble a 3-D model using material properties, a process description, and library compo-
nents. As components are added to a model, they instantly appear on the design canvas, allowing the user to easily
identify potential problems with component dimensions. The final design can be exported as a GDS file or as a 3-D
SAT file, or imported and used in a circuit simulator, such as MATLAB, Simulink, or Cadence Virtuoso. Results
from those simulations can be opened in the MEMS+ Scene3D module for 3-D viewing.
foundry, can restrict schematic creation to a subset of the component types, with default properties values that make
sense for one specific process, and can define locks and constraints as required by their design rules.
In Innovator, MEMS device models are created with a library of parametric component generators for suspensions,
plates, combs, and electrical pads. The MEMS designer picks components from the library to assemble the desired
structure. Each component can be assigned to one or multiple deposits of the corresponding process file, and compo-
nent parameters can be defined as values, variables or algebraic equations. Select components can be enhanced with
piezoelectric models. To individual components, users can also add gaps that include electrode/contact and squeeze-
film damping models, pressure loads, or cavities. Once a design is complete, it ready for simulation in the MEMS+
Simulator module or for export to MATLAB, Simulink, or Cadence.
M
Each step has parameters that must be specified. For example, for deposit steps the user must specify the material to
be deposited and the deposit thickness. For etch steps, the user must specify a mask, which will be used to pattern the
previous deposit.
The process is saved to a file with a .mproc extension. In the Component Library tab, the user associates the process
file with a model so that individual components can be assigned to the process deposit layer(s).
For detailed information on the Process Editor, see the section beginning on page R2-1 of the MEMS+ Reference.
1.2.4: Innovator
Innovator allows users to assemble their MEMS device using a 3-D library of parametric components. It is effectively
a 3-D schematic editor for MEMS. As components are added, the user sets the dimension and deposit information, as
well as connects the components to other components. Each component has a rich set of parameters that can be incor-
porated in a P-cell implementation. The component then appears on the canvas as the user defined it. Any mistakes in
dimensions or orientation are immediately apparent to the user.
When the model is complete, the user saves the device as a 3-D schematic file (with a .3dsch extension) and can then
export a layout in GDS or a solid model in SAT format or import the MEMS model into MATLAB, Simulink, or
Cadence Virtuoso.
For detailed information on the Innovator module, see the section beginning on page R4-1 of the MEMS+ Reference.
1.2.5: Simulator
Simulator allows the user to conduct basic MEMS device analysis to verify the correctness of a device before export-
ing it to MATLAB, Simulink, or Cadence Virtuoso for system simulation. Simulator can be used to run the following
analyses:
DC analysis: steady-state equilibrium with mechanical and electrostatic forcing, electrostatic pull-in and lift-
off, and contact
1.2.6: Scene3D
Scene3D allows users to import and visualize results from MATLAB, Simulink, or Cadence Virtuoso. This module is
only accessible when a result file is selected. Users will be able to visualize DC, AC, modal, and transient results with
Scene3D.
When a MEMS+ model is incorporated into a MATLAB script, a Simulink system model or a Cadence Virtuoso
schematic, and then simulated, the simulator produces results files with the same name as the Innovator schematic
used to produce the MEMS+ symbol, and these result files are written to the same directory location as that sche-
matic. Those result files can then be opened in Scene3D.
For more information on this module, see the section beginning on page R6-1 of the MEMS+ Reference.
Result files generated from a MATLAB script, a Simulink model, or a Cadence Virtuoso schematic without a
MEMS+ symbol cannot be viewed in Scene3D.
List of items
added to model
M
3-D View
In Figure 1-2, the Material List is a tree of items for the Material Database, and the large subwindow in the window in
the middle is the property editor for materials. At the right is the variable list and the Comment Editor.
The Process Editor's tree of items is its list of process steps. These are shown in the center of Figure 1-3 below. The
Process Editor has a property editor for editing the properties of the step that is selected in the tree of items, which is
shown at the bottom of Figure 1-3. The Process Editor has an Item Library and a Comment pane that are not dis-
played by default. To show these panes, right click on any pane title bar, and select the pane you would like to dis-
play.
M
Property Editor
Whenever MEMS+ is started, this default document will be automatically loaded. Note that if you select a default
component library, the process file and material database file that are associated with that file will also be used in any
new design. So if you set a default component library, you will automatically have a default process and material
database.
M
To return the module to the its tab interface, click on the X in the upper right corner.
To move a pane, click on its title to select it, and drag it to the desired location. To redock a pane that has been
undocked, double click on that pane’s title bar. To return all the panes of an active tab to their default locations, use
the keyboard shortcut Ctrl + Shift + W.
To hide a pane, simply click on the X in the upper right corner of that pane. To configure which tab component is dis-
played or to display a tab component that has been hidden, right click on the title bar of any of the visible panes or on
the icon bar, and a list of available component appears, as shown in Figure 1-5. Visible components are checked. If a
component is hidden, selecting it from this list will display it. If that component is displayed, selecting that compo-
nent will hide it.
Application Icons
On the application level, four icons are always available in the top icon row no matter which module is active: New,
Open, Application Options, and Open Transcript. The New icon opens a new instance of the MEMS+ application
with no Innovator document loaded. If a default file is selected from the Application Options dialog (see below), that
file will be loaded in the corresponding tab. The original MEMS+ application and its active document are left open.
The keyboard shortcut for this functionality is Ctrl + Shift + N.
The Open icon opens up a file browser that allows you to select another file, which will open in a new instance of
the MEMS+ application. The original MEMS+ application and its active document are left open. The keyboard short-
cut for this functionality is Ctrl + Shift + O. Also note that Scene3D files can only be accessed from this icon; see
page R6-1 for more details.
The Application Options icon opens a dialog for configuring default settings for each of the MEMS+ modules. It
has the following tabs:
MEMS+: This tab is used to configure global settings for the software.
License Server: Specifies the license to be used by the software. For information on configuring a license,
see “Licensing” on page U1-18.
Hardware Rendering: By default hardware rendering (OpenGL) is checked, but if you are having prob-
lems with display problems, you may want to uncheck this option. Unchecking this option turns off
OpenGL, which on a Linux machine or on a system with an integrated graphics card may give the best
results for displaying remotely.
Log File Location: Specifies the directory to which to write the log file for MEMS+; this log file can be
useful for troubleshooting any problems encountered with MEMS+.
Default Document: Specifies a default file to open each time a new MEMS+ console window is opened.
Undo Stack Depth: Sets the number of undo/redo actions that are stored in memory. Reducing the number
of undo/redo actions may help if a user is having problems with computer memory.
Innovator: This tab has its own subtabs for designating a default process for any new 3-D schematic, and for
configuring canvas views, and colors. See page R4-36 for more details.
Scene3D: This tab has its own subtabs for configuring how the results are displayed. See page R6-12 for
M
more details.
The keyboard shortcut for opening this dialog is Ctrl + Shift + P.
For a complete listing of available keyboard shortcuts, see the section beginning on page U6-1.
The Open Transcript icon opens a transcript window that displays the Python commands executed for any con-
struction activity that takes place in any of the tabs in the MEMS+ Console. From this window, you can enter your
own Python commands or execute Python scripts. You can write a Python script to automate repetitive tasks, and then
execute that script from the transcript window. Communication between the transcript window and the software inter-
face is two-way, so if you make a change in the transcript window, it is reflected in the model displayed in the inter-
face. For more information on using this transcript window, see page U1-12.
The keyboard shortcut for opening the transcript window is Ctrl + Shift + T.
For information on the Python scripting language, go to http://www.python.org.
Keyboard
Icon Function Description
Shortcut
Open a new
Closes the active file and opens a new, blank document Ctrl + N
document
Opens file dialog that allows you to select and open a file that will replace
Replace the current file. The available files will be filtered according to which Ctrl + O
module is active.
Save the Opens a file dialog to specify a new file name. The dialog that opens
document displays not only the active file, but all the files the active file is dependent
---
with another on. From this dialog the user can specify a new name of the active file and
name for the files it is dependent on.
Keyboard
Icon Function Description
Shortcut
Ctrl + Y (Windows)
Redo Redos the last action that was undone Ctrl + Shift + Z
(Linux)
Copy Copies an entity for pasting in another location in the active list Ctrl + C
Cut Deletes the selected entity, but makes it available for pasting Ctrl + X
Paste Pastes the copied entity into the active list Ctrl + V
If an entity is selected in a list, clicking on this icon will allow you to enter
Rename F2
a new name for that entity.
Each operation is performed using proprietary bindings to the Python Programming Language (http://
www.python.org). Each operation performed starts with a comment line starting with '#' indicating the type of opera-
tion such as erase or set item's properties and consists of a few lines until the line before the next com-
ment line.
The transcript of the entire MEMS+ session is stored in the user's home directory as the file MEMSp.py. This file is
overwritten each time MEMS+ is launched, so if you need to save this file, be sure to copy it to another location.
In the home directory is an annotated version of the transcript called MEMSp.log, which contains not only each oper-
ation, but also extra messages produced by MEMS+ indicating actions taken as a result of the requested operation.
This file is also valuable for communication with Coventor technical support.
The .log file location can be changed using the Applications Options dialog, which is accessible from the top row
Applications Options icon.
M
Macros and Replaying Parts of a Transcript
Creating designs in MEMS+ specific to your organization can sometimes require custom steps that must be repeated
often. To avoid repeating these steps in MEMS+, you can assemble the operations from the transcript window into a
text file and rerun those operations directly in the transcript window. The aggregate operation performed by this text
file is often called a macro operation.
Similarly, if unsaved data is lost, the lost operations can be cut from the MEMSp.py and assembled into a new text file
that can be replayed in the next MEMS+ session.
For example, if we wished to make a macro that just sets an item's properties as shown in the Transcript window in
the figure above, we'd cut just this part out of the MEMSp.py file:
##################### set Item's properties ####################
_item = _docs['3dsch'].getItem('/Beam')
p0_ = _docs['3dsch'].getItemProperties(_item)
p0_.layers.set('midlyr,toplyr')
p0_.layers.midlyr.thicknessOverride.set('ContactPadHeight+btmlyr_h+midlyr_h')
p0_.zOffset.set('-ContactPadHeight-btmlyr_h')
p0_.position.end1.x.set('AnchorLength+ActuationPadLength+SeparationBeamLength')
p0_.position.end2.x.set('AnchorLength+ActuationPadLength+SeparationBeamLength+
TransLineLength')
p0_.width.set('ActuationPadWidth')
p0_.layers.midlyr.setAttributes(isExpanded='true')
p0_.position.setAttributes(isExpanded='true')
p0_.position.end1.setAttributes(isExpanded='true')
p0_.position.end2.setAttributes(isExpanded='true')
p0_.position.end2.x.setAttributes(customCheckUnit='um', isExpanded='true')
p0_.width.setAttributes(customCheckUnit='um', isExpanded='true')
_items = _docs['3dsch'].getItems(['/Beam'])
_docs['3dsch'].setItemsProperties(_items, [p0_])
Then save it in a separate file with a .py extension. Note that this is identical to what was seen in the transcript, except
the >>> prompts have been removed. Once saved, to replay:
1. Open the model you would like to operate on. In this case, this operation is to be done to the RFSwitch.3dsch
provided in the Examples directory.
2. From within the transcript window, click on the Open icon to open a file selection dialog.
3. Once the file you created above is selected, click on Run in the file selection dialog.
Note if you have multiple MEMS+ windows open, the window you wish to operate on must be the last one to have
focus before clicking on the transcript window's Open icon. Also note that operations in the MEMSp.py file that are
marked do not replay in user interface should never be included in a macro file to be replayed.
Variable and variable group names can only contain letters, numbers, or underscores. No other non-alphanumeric
characters or spaces are allowed. Names must be unique for variables and groups on the same level of hierarchy,
and variable names that differ only by case are not allowed. In addition, variable and group names cannot begin
with a number.
Also note that value is a reserved keyword and cannot be used as a variable name.
To assign a value to a variable, click once in the Value field, then enter the desired value. The value can be a number,
an expression, or another predefined variable. Note that if a variable is defined with other variables, it cannot be
exposed. The default value of a variable can only be set from the module in which it was created. For example, the T
variable was created in the Material Database module, so its default value is whatever value it was set from that mod-
ule. If you were to change the temperature value from the Innovator tab, it would be saved with the schematic, but the
default value in the material database will remain the same. To set a variable value to its default value, right click on
the variable and select Default, or use the keyboard shortcut Ctrl + R.
Once a variable is defined, it can be used to define model parameters. When you type any letter in a properties field,
a drop-down menu appears with all the variables that begin with that letter. This feature allows you to easily select a
variable without having to enter its entire name or to worry about the exact spelling of a variable. If you enter a vari-
able name that does not exist in a field, the field will display an error. You can then right click on the field, and select
Add variables; a dialog will open in which you can define a value for that variable. Once you define the variable
value, the variable will be added to the Variables list.
To see if a variable has been used in a property or component definition, right click on that variable, and select High-
light dependencies, or use the keyboard shortcut Ctrl + D. In the Material Database, Process Editor, and Component
Library, the steps, parameters, or components that were defined by the variable will be displayed in the Properties
pane. In Innovator, the components that were defined with that variable will be highlighted in the canvas and in the
Components list.
By default the Variables pane displays the Name and Value parameters. To display other properties, right click in
property title bar and select other options. The other options include
Expression: This option can be used to display the expression used to define a Value. An expression can be
entered in the Value field, but only the value of that expression is displayed. With this option, the expression
can be entered and displayed in the Expression field, and MEMS+ evaluates it and puts in the result in the
Value field.
Lower Limit, Upper Limit: These options are used to limit Value inputs; see “Limiting Variable Values” on
page U1-17.
These properties can also be viewed in the variable’s Property dialog, which can be accessed by double clicking on
the variable or by right clicking on the variable and selecting Properties.
M
Variables can be defined with any of the functions listed in Table 1-2.
All functions are defined within the context of their mathematical description. As such, all trigonometric
functions accept radian inputs, and not degree inputs.
Function Description
Function Description
Priority in order
Operator Meaning
of operation
or logical or 2
!= not equal 4
+ addition 5
- subtraction 5
* multiplication 6
/ division 6
M
When these fields are set, the Value field cannot be changed to a value that is lower than the lower limit or higher
than the upper limit. If that variable is exposed (see page U1-17), the value can be changed in other modules, but the
limits cannot. If the MEMS+ model is exported, the limits will also be included.
The exposed variable value can be changed from any module it appears in, but its name can only be changed from the
module in which it was created. If you have changed a variable value in a module other than the one it was created in,
you can revert to its original value by right clicking on the variable and selecting Default. If a variable is changed in a
module other than the one it was created in, it will be designated with a icon in the Variables Pane of module in
which it was changed.
When a local variable already exists, and an exposed variable with the same name is created in a dependency, an
update will connect the two variables with the same name as one unique exposed/imported pair. The local variable
keeps its original value, and appears as an overridden variable (with a icon). Also note that in this unique case
(local variable created first, then exposed variable with the same name is created in a dependency), the linked variable
can only be deleted or renamed in the dependency file, not from the module it was created. For example, if a variable
is created in Innovator first, and then the same named variable is created and exposed in the Material Database Editor,
the exposed variable can only be deleted and renamed in Material Database Editor, even though it was first created in
Innovator.
If a variable is exposed from any of the MEMS+ modules, it will appear as a schematic model parameter of the cre-
ated MEMS+ symbol (in the symbol’s CellView Properties dialog).
To hide an exposed variable, right click on it and select Hide, or use the keyboard shortcut Ctrl + H. If this action is
applied to a group, all the variables in that group will be hidden.
1.5: Licensing
Before you can run MEMS+, you must specify a license file. The first time you run MEMS+, you will be prompted to
select a license. The Application Options dialog opens with the License tab displayed. Set the License Server field, to
54000@hostname, where hostname is the name of the computer where the license is installed. This dialog can also be
accessed from the Application Options icon.
To specify more than one license server, separate the portnumber@hostname entries with a comma.
Note that a single license server specification (portnumber@hostname) cannot be more than 65 characters long.
5. Draw all rigid geometry under one rigid plate (see page C3-6 for details on this component):
a. Look for the minimum number of segments needed to build the rigid geometry.
b. Define variables to describe these segments.
c. Add the segments to the rigid plate.
6. Add any needed gaps to the rigid plate segments (see page C4-2 for details on rigid plate gaps):
a. Distinguish between side gaps and top/bottom gaps.
b. Define the extra variables to describe the gaps (use rigid geometry variables in other places)
c. Add the gaps to the rigid plate segments.
d. Define the fixed deposit of the gap.
e. Define the gap with an electrode/contact model, a squeezed-film damping model, or both.
M
7. Add flexible beams to the model (see page C3-69 for details on this component):
a. Define variables to describe the beam segments and the electrodes that may be associated with those beams.
b. Add beams to the model.
c. Add any gaps that need to be defined in relation to the beams, and define the appropriate gap model(s).
8. Use the Mirror, Replicate, and Group functions to define other parts of the geometry (see page R4-8 for
details on these functions).
9. Use the Wizard function to connect the various components and to set appropriate scale factors (see page R4-
17 for details on this function). In the case of the rigid plate, this function will connect other segments to a
single connector of the rigid plate.
10. Rename and expose any connectors that you want exposed. See page R4-13 for details on mechanical con-
nectors; see page R4-24 for details on electrical connectors; and see page R4-26 for details on fluidic connec-
tors.
11. Expose variables that need to be visible in the schematic symbol.
Note that for shape components and for some of the beam models, you can change the underlying model used and the
number of integration points even after the design is complete. This feature allows the user to initially focus on creat-
ing geometry rather than worrying about underlying model elements. But whenever you change the model or the
number of integration points, make sure to rerun the Wizard before simulation.
MEMS+
MATLAB Simulink Cadence
Simulator
Small Signal AC: linear frequency response to Yes Yes Yes Yes
mechanical and/or electrostatic forcing with Reynolds
gas damping effects
A transient analysis can be one of the most difficult analyses to converge. The optimal settings for each simulator is
summarized below.
Cadence Virtuoso/
Simulation
Spectre MATLAB2 Device Type
M
2 Transient ODE MATLAB Default options is ode15 when started from a DC and ode23 when started from an AC.
3
BDF corresponds to the Gear method, but NDF is an enhanced version offered in MATLAB.
For more details on the MEMS+ Simulator module, see page R5-1 of the MEMS+ Reference.
For more details on using MEMS+ models with MATLAB, see page U2-1.
For more details on using MEMS+ models with Simulink, see page U3-1.
For more details on using MEMS+ models with Cadence, see page U4-1.
MEMS+-for-MATLAB adds the scripting flexibility and data post-processing of the MATLAB platform from Math-
Works to Coventor’s MEMS+. MEMS+-for-MATLAB provides a variety of MATLAB script functionality that
allows model import, manipulation and simulation directly from the MATLAB command line interface. The scripts
provided by MEMS+ support DC, Modal, AC, pull-in, nonlinear frequency hysteresis, and transient analyses without
requiring any additional toolbox. It can also be used to model squeezed-film damping and substrate coupling. All
MATLAB simulation results can be loaded back into the MEMS+ Scene3D module for 2-D and 3-D viewing. Users
can also edit existing MEMS+ files or create MEMS+ files within the MATLAB interface.
This section details the steps necessary to use the MEMS+-for-MATLAB interface. It assumes familiarity with both
M
MATLAB and MEMS+ Innovator for MEMS model creation. Note that this interface is for creating and accessing
MEMS+ Innovator models and performing analyses on them. It is not for accessing a Simulink model containing a
MEMS+ symbol. For information on using MEMS+ with Simulink, see the section that begins on page U3-1.
Before you can use your MEMS+ models in MATLAB, you must set up your MATLAB environment so that you
can access those models; see page 4-1 of the MEMS+ Installation Guide for more details.
Note that the codeUpdater utility will not preserve line continuations (lines that end with ...). Multi-line
functions will be merged into one line.
Variable Names
In versions of the software earlier than 6.2, if a variable was part of a group, its name in MATLAB was a concatena-
tion of the group name and the variable name. Below is an example of how to call a variable in MEMS+ 5.0:
vars('ElectrodeProtrude') = 10
In MEMS+ 6.2 onward, the variable names reflect the structure of the variable tree:
h.Variables.Electrode.Protrude = 10;
The codeUpdater does not have information about the variable groups and will not be able to update the variable
names to the new structure. Users will have to update these variable names manually.
Use of cov.memsplus.Document
cov.memsplus.Document has to be replaced by one of cov.memsplus.MaterialDatabase, cov.mem-
splus.Process, or cov.memsplus.Schematic. The codeUpdater handles the most frequent situations; for
example:
cov.memsplus.Document('../a/b.mmdb'); is updated as
cov.memsplus.MaterialDatabase('../a/b.mmdb');
cov.memsplus.Document('filename.3dsch']); is updated as
cov.memsplus.Schematic('filename.3dsch');
However, a line in which if the complete filename is hidden in a variable, such as
cov.memsplus.Document(filename)
will not be handled and should be updated manually.
2.2.1: Terminology
All MEMS+ documents use the same structure of items, children of items, properties and subproperties to store their
contents. To explain the concept of items and properties in detail, we will use a material database as displayed in the
MEMS+ interface as an example:
M
Root Item
Top-level
Children items properties of
of the Root Aluminum
Subproperties
of Piezoelectric
Coefficients
Every type of document has a root item. The name for the root that appears in the user interface is Material List for
the Material database, Substrate for the Process Editor, User Library for the Component Library, Components for
Innovator, and Analyses for the Simulator. When item a is added to item b, item a is called a child of item b, and item
b is the parent of child a. Children are shown indented underneath the parent, as shown in Figure 2-1. The root item
with all its descendants is collectively called the item tree. When the user double clicks on an item, a separate window
with the item's properties opens. In the case of the Material Database and the Process Editor, properties are also dis-
played when an item is selected, as shown in Figure 2-1. Properties can have children properties. Properties that are
not a child of another property are called top-level properties. Most of the properties shown in Figure 2-1 are top-
level properties. Top-level properties have subproperties if there is a triangle displayed to the left of the property. If
the triangle is unfilled, the subproperties are hidden.
All MEMS+ documents have a main item tree as described above, and some documents have additional supplemental
item trees. For example, in Innovator, the Components tree is the main item tree, and the Mechanical, Electrical, and
Fluidic Connector trees are supplemental item trees.
To get a list of available choices for an item or an item property, enter the item name.property with no defined value.
For example, entering
Aluminum.Properties.ElasticConstants
prints the following:
Available choices are: 'Isotropic', 'Cubic', 'Orthotropic', 'Anisotropic';
% For practical use (smaller code lines, one can create the following Item:
Aluminum = d.MaterialList.Aluminum;
Aluminum.Properties.ThermalCoefficientOfExpansion.ZeroStressTemperature =
{'273.15','K'};
M
Substrate.Properties.Material = 'Aluminum';
Creating a Schematic
Below is an example of a script that creates a new schematic and populates it with variables and components:
h = cov.memsplus.Schematic('Gyroscope_scripting.mlib');
h.Variables.add('Variable')
h.Variables.Variable1.rename('PlateSizeX')
h.Variables.PlateSizeX.Properties.Value = 100;
h.Variables.add('Variable')
h.Variables.Variable1.rename('PlateSizeY')
h.Variables.PlateSizeY.Properties.Value = 100;
RigidPlate = h.Components.add('RigidPlate')
Rectangle = RigidPlate.add('RectangularSegment')
Rectangle.Properties.Deposits = {'poly'};
Rectangle.Properties.RectangleDefinition.BySize.Size.x = 'PlateSizeX';
Rectangle.Properties.RectangleDefinition.BySize.Size.y = 'PlateSizeY';
IGap = Rectangle.add('InheritedGap')
IGap.Properties.FixedDeposits = {'elec'};
Beam1 = h.Components.add('Beam')
Beam1.Properties.Deposits = {'poly'};
Beam1.Properties.Position.End1.x = -50;
Beam1.Properties.Position.End2.x = -150;
Beam1.Properties.Width = 5;
Beam1.Properties.FaceType.End2 ='Fixed';
h.applyWizardActions
h.save('RigidPlate_Beam')
This script creates the device shown below. Note that if you create a schematic using a MATLAB script, be sure to
open it in MEMS+ to verify that you have the desired geometry and that it is constrained properly.
importAsRigidPlate
This option imports a top cell of a Layout component as a rigid plate, as demonstrated below:
s = cov.memsplus.Schematic('Microbolometer.mlib');
M
% Add a new Layout component
s.Components.add('Layout');
% Update the Layout component to confirm the selected layout to refresh the GDS cells
% and layers. This is equivalent to selecting Apply in the MEMS+ interface.
s.Components.Layout1.update
s.Components.Layout1.TopCellMicrobolometer.importAsRigidPlate
s.saveAndOpenInMEMSp('MicrobolometerFromLayoutScript')
The above method has an optional argument allows the user to specify the new name of the rigid plate to be created:
s.Components.Layout1.TopCellMicrobolometer.importAsRigidPlate('newPlateName');
The resulting 3-D model is shown below:
importAsPolygonSegment
The option imports the selected GDS layer to a Rigid Plate\Polygon Segment. This method requires more input from
the user: the user must map the process deposits to the correct GDS layer, as well as set the correct merge setting.
This option has the following arguments:
importAsPolygonSegment(parentRigidPlate, listofLayers, merge)
parentRigidPlate: the name to the parent rigid plate the polygon segment will be added to; it can be left empty
(e.g. '') to create a new one.
listofLayers: Specifies a cell array of strings with required layer names
merge: true if the segments should be added; false if the segments should be subtracted.
To create the same device shown in Figure 2-2, you would need the following code:
s = cov.memsplus.Schematic('Microbolometer.mlib');
s.Components.Layout1.TopCellMicrobolometer.L5D0.importAsPolygonSegment('',
{'Ti','Al', 'Ti2', 'TiN'}, true);
s.Components.Layout1.TopCellMicrobolometer.L3D0.importAsPolygonSegment(s.Compo-
nents.RigidPlate1, {'AnchorVia'}, true);
s.Components.Layout1.TopCellMicrobolometer.L0D0.importAsPolygonSegment(s.Compo-
nents.RigidPlate1, {'aSi', 'TiN_Absorption'}, true);
s.Components.Layout1.TopCellMicrobolometer.L3D0.importAsPolygonSegment(s.Compo-
nents.RigidPlate1, {'aSi', 'TiN_Absorption'}, false);
s.Components.Layout1.TopCellMicrobolometer.L2D0.importAsPolygonSegment(s.Compo-
nents.RigidPlate1, {'TiN_Absorption'}, false);
s.Components.Layout1.TopCellMicrobolometer.L4D0.importAsPolygonSegment(s.Compo-
nents.RigidPlate1, {'Anchor'}, true);
%%
s.saveAndOpenInMEMSp('MicrobolometerFromLayoutScript')
M
You can also double click on a file in the Current Folder pane to open it.
Note that the opened document will be stored in global MATLAB variable named h. If the h variable is already
defined, it will be overwritten by this operation.
If necessary, the name of global variable h, as well as the desired behavior (e.g. associate .3dsch files with Schematic
document or with the Simulation document), may be adjusted in the MATLAB scripts located in /runtime/matlab/file-
Associations/.
Note that additional files, such as subschematics and GDS files cannot be saved using the saveAs command.
To save MEMS+ documents to the Devices subdirectory of a CoventorWare project, use
.saveAsProject(projectName)
If the name of an existing project was specified, the files will be added to the project’s Devices subdirectory, overwrit-
ing any files of the same name files already contained in it. If the specified project does not exist, it will be created,
and then the files will be added.
Exporting a Schematic
When exporting a schematic, the user has several options:
.exportACIS('filename.ext') exports a binary (.sab) or text (.sat) ACIS geometry file. The ACIS file type
is determined based on the filename extension. If no file extension is specified, the .sab extension is appended, and
the file is saved in binary format.
For the .sat export, the user can also specify a version number, for example,
h.exportACIS('file.sat', 25)
If no version number is specified, the .sat file is exported in R26 format.
.exportGds('filename') export the layout in .gds format.
.exportCoventorWare(projectName, modelName) exports a solid model from the Innovator Schematic
to the specified CoventorWare project and model. If an existing model of an existing CoventorWare project was spec-
ified, it will be overwritten. Otherwise, a new project and a new model will be created.
To accelerate the export to CoventorWare, start the CoventorWare user interface beforehand. In this case, the
database server will be started, and each call to .exportToCoventorWare in MATLAB will be significantly
faster.
The saveAndOpenInMEMSp command also takes a name argument if you would like to save the document under
another name. For example,
h.saveAndOpenInMEMSp('SaveAsAnotherName.3dsch')
To reload a modified MEMS+ document in MATLAB, use
h.reload()
There is a similar function for a result file:
h.Analyses.DC1.Result.openInMEMSp()
However, it does not overwrite the result file, it just loads the original version of the result file in MEMS+.
M
cov.memsplus.utilities.deleteSimulationFiles
2.2.9: Items
A MEMS+ document contains several trees (e.g. Components, Inputs, Mechanical Connectors trees of an Innovator
document). The elements that compose the trees are called items.
In the MATLAB scripting these trees are translated as trees of MATLAB objects, each of them represents a MEMS+
item. Useful functions for these MATLAB objects are explained below.
All the tree panes that are available in MEMS+ Innovator are now accessible as items in MATLAB.
The same method can be used to get a list available tree items:
To access an item in one of these trees, use the item tree name, then the name of the item:
>> tip = rf.MechanicalConnectors.Beam_Tip
Another example:
>> actuation = rf.Components.Actuation_Pad.Actuation
AboutLocalY: 0
NumericalSimulationSettings:
SamplePointDensity: 1
DrillingDOFPenaltyFactor: 1.000000e-01
...
M
Similarly to the interface, the analysis has to be up-to-date in order to have a non-empty information.
To specify a custom title for the information window, use .getInfo('My getInfo title').
Filters
The functions filterByName and filterByType allow the user to recursively select some items by its name or
its type.
In the function
filteredItems = filterByName(obj, namePattern)
the input argument namePattern is a regular expression (see http://mathworks.com/help/matlab/ref/regexp.html),
so by default, filterByName searches for an occurrence of namePattern in the names (or types) of the items.
For example,
h.Components.filterByName('Actuation')
will return Actuation and Actuation_Pad.
To search the exact phrase:
h.Components.filterByName('^Actuation$')
where the identifiers ^ and $ denote the beginning and the end of the string respectively (an exact match). To search
for a string beginning with a phrase, use ^ ; to search for a string ending in an phrase, use $. The MATLAB regexp
syntax is used in the argument of filterByName.
If namePattern is not specified, this function returns all the children items nested under current item. When
applied to a component of an Innovator document, the filterByName function will also return deposit items.
The filterByType function behaves similarly to filterByName, but here typePattern defines a regular
expression to be searched among the types of items. If no typePattern is specified, this function returns an empty
array and prints out the types of children that are available under the current item.
The use of regexp allows the user to search for all the strings that do not contain a certain pattern. For example, the
following line returns all the components except Deposit components:
h.Components.filterByType('[^(Deposit)]')
To recover filtered names in a cell array, use
{h.MechanicalConnectors.filterByType('MechanicalConnector').Name}'
or
filteredItems = h.Components.filterByName();
{filteredItems.Name}'
To get a list of the initial positions of all mechanical connectors:
[h.MechanicalConnectors.filterByType('MechanicalConnector').InitialPosition]
For the tutorial RF switch design (see page T4-1 of the MEMS+ Tutorials), this command returns an array of the x,y,z
1.0e-03 *
Type
Returns the type of the item, such as SolidMaterial for material items.
add()
This command corresponds to the Add right-click action in the MEMS+ interface. For example, it can be used to add
a material item to a database:
d = cov.memsplus.MaterialDatabase;
d.MaterialList.add('Solid');
or to add an analysis item:
h.Analyses.add('DC')
You can use the output of the add function to recover the handle to the newly created item directly:
dc1 = h.Analyses.add('DC')
If you call the add command without arguments, it will print the list of items that can be added under the current
item:
h.Analyses.add
'Vary'
'ModelReduction'
M
initial state:
h.Analyses
DC1
DCtoMove
DC2
The command
DCtoMove = DCtoMove.move('childOf', h.Analyses)
places the dc Analyses item at the last position under h.Analyses:
h.Analyses
DC1
DC2
DCtoMove
While the command
DCtoMove = DCtoMove.move('before', h.Analyses.DC1)
produces the following output:
h.Analyses
DCtoMove
DC1
DC2
There is also an after function:
DCtoMove = DCtoMove.move('after', h.Analyses.DC1)
which produces
h.Analyses
DC1
DCtoMove
DC2
Note that the handle to the item has to be reassigned using the output argument, i.e.,
dc = dc.move('childOf', h.Analyses); % After this command, dc will point to the moved
item.
and not
dc.move('childOf', h.Analyses); % After this command, dc will point to a deleted MAT-
LAB object, which cannot be used any more.
The optional argument 'name' is used to rename the item being removed or copied:
dc = dc.move('childOf', h.Analyses, 'name', 'newDC');
2.2.10: Properties
Retrieving and Setting Properties
To access properties of item, specify their full path using "." as the separator. For instance, the number of integration
points for the straight comb item is a subproperty of the numerical settings, as shown below:
doc = cov.memsplus.Schematic('Gyroscope_prebuilt.3dsch')
it = doc.Components.RigidPlate.TopComb.StraightCombStator
it.Properties.NumericalSettings.IntegrationPoints = 4
If it is unclear whether the specified property exists, press the Tab key after typing a period to see the available prop-
erties, as shown below:
Or you can output the property tree to the MATLAB console using the Properties command. For example,
it.Properties
ans =
GapFluid: {''}
NumericalSettings:
IntegrationPoints: 1
CombCells:
ByNumber:
NumberOfCombCells: 1
...
For more information on how to set properties, see the section beginning on page U2-29.
Get Commands
The property's expression, units, and evaluated value of its expression can be accessed with get(). For example:
myexpr = h.Variables.Beam.Length.get();
M
Database example, not all required properties were set on the new materials. This is why those items were colored red
when the document was opened in MEMS+. To see a list of all of the errors for an item's properties, first get the root
property (parent of all the top-level properties), the item name, and then call getErrors():
mat = cov.memsplus.MaterialDatabase('MEMSpMaterialDatabase.mmdb')
p = mat.MaterialList.Aluminum.Properties()
errs = p.getErrors()
ans =
Variables are stored as part of a special item tree and are accessed and modified in a similar manner as the main item
tree described in the section beginning on page U2-11. To access the variable AnchorLength, first note that in the tree
this variable is a leaf named Length whose parent is a group named Anchor that is a child of the root. A variable can
be changed with document.Variables.VariableName. The lines below demonstrate how to create an object
representing the variable, and then change its value through the owning document:
d = cov.memsplus.Schematic('RFSwitch_prebuilt.3dsch');
v = d.Variables.Anchor.Length
v = 75
For users of previous versions of MEMS+, note the change in syntax when creating a variable object that is part of
a group. In previous versions, a variable that was part of a group was called by GroupNameVariableName. In
MEMS+ 6 and later, the variable names reflect the structure of the variable tree, so hierarchy is denoted by a period
(GroupName.VariableName),
The above script changes the value of AnchorLength to 75 by accessing the value property of the variable item. A
variable has other properties besides its value. For example, all the properties of AnchorLength are shown in the mid-
dle of the figure above. Because the variable v is an item object type, the methods described in “Properties” on page
U2-16 can be used to access its other properties. For instance, the printWithProperties method shows all the
properties of v:
v.printWithProperties
outputs the following:
Length (Variable) with properties:
Value: 75
Exposed: 0
Limits:
Lower: NaN
Upper: NaN
And printing from the root lists all the variables without their properties
d.Variables.print
outputs the following:
Variables (Tree root)
T (Variable)
Pressure (Variable)
BottomPassivation_h (Variable)
Dimple_h (Variable)
TopPassivation_h (Variable)
Sacrificial_h (Variable)
Anchor (Group)
Length (Variable)
Width (Variable)
...
To list only exposed variables in Innovator, use filterByType, as demonstrated below:
h = cov.memsplus.Simulation('RFSwitch_prebuilt.3dsch');
{h.Variables.filterByType('Variable').Name}
outputs the following:
ans =
Columns 1 through 6
Columns 7 through 10
M
Value: 101325
Exposed: 1
Limits:
Lower: 1.000000e-03
Upper: 10000000000
...
Comparing Documents
Two documents can be compared using doc.compareTo(otherDoc). The results of the comparison will be dis-
played in a separate window, as shown below. Here is an example of documents that have the same items, but the
properties are different:
d2 = cov.memsplus.Schematic('Beams_prebuilt.3dsch');
d3 = cov.memsplus.Schematic('Beams_nonlinear.3dsch');
d2.compareTo(d3);
In the above example, for the Beam models, the Model Type has been changed from 0 (linear) to 1 (nonlinear). These
differences are highlighted in red.
By default, only the differences are shown. If you would like to see the changes in the context of the entire file, click
on the View tab, and then click on the Filter drop-down menu to uncheck Show Differences Only.
If the items are not identical, such as when an item is removed, added or renamed, the comparison reports that a dif-
ference exists, but not in full detail. For instance, in the material database below, the second file is identical to the
first, except that material Gold has been removed.
m1 = cov.memsplus.MaterialDatabase('MEMSpMaterialDatabase.mmdb');
m2 = cov.memsplus.MaterialDatabase('MEMSpMaterialDatabase2.mmdb');
m1.compareTo(m2)
The comparison detected that Gold is in one document, but not the other. Differences of addition are highlighted in
green.
Note that the comparison is only on the parts of the document accessible to MATLAB scripting.
Comparing Properties
Properties are often copied and slightly modified within a document. To detect those differences, two properties can
be compared with prop.compareTo(otherProp). For instance, in the Gyroscope tutorial, the two sets of comb
fingers on opposite sides of the proof mass should be mirror images of one another. To confirm:
d2 = cov.memsplus.Schematic('Gyroscope_prebuilt.3dsch');
pbotcomb = d2.Components.RigidPlate.BottomComb
ptopcomb = d2.Components.RigidPlate.TopComb
pbotcomb.compareTo(ptopcomb);
The comparison shows that only the name and the mirror flag about the y-axis are different, as expected:
M
2.2.13: Updating MEMS+ Documents and Items in MATLAB
Due to the inherent limitations of MEMS+ for MATLAB scripting, in some situations you need to manually update
the documents, the items, and/or their properties in order to have them accessible in MATLAB. If the item you edit
has hierarchy, you will need to update. For example, if you add a Layout component to a schematic, and specify the
filename of GDS to be used, you will need to do an update to refresh the GDS top cells and layers, which are children
of the Layout component, as demonstrated below:
schematic.Components.add('Layout');
schematic.Components.Layout1.Properties.Filename = 'microbolometer.gds';
schematic.Components.Layout1.update
beam.getElectricalConnectors()
beam.getFluidicConnectors()
beam.getOutputs()
connector
port connector
>> dc.Result.Outputs.print;
1 P_Beam_Tip_z m -2.91106e-09
2 A_Beam_Tip_ry rad 1.47973e-05
M
If your answers differ from the ones displayed above, you may need to use the format short e command to
make the console display the answers in exponential format with more significant digits.
The line dc = h.Analyses.add('DC'); creates a new blank DCAnalysis object with default settings. The
name dc is arbitrary and can be any valid MATLAB variable name. Then one or more statements set up the object
until finally dc.run() is called. The parameters of the analysis are defined with analysisObject.Proper-
ties.argument. Note that no calculation happens until dc.run() is executed, so multiple dc.Proper-
ties(…) statements can be run in order to set various DC voltages.
When dc.run() is executed, extra output is printed showing the result of each iteration of the DC solution. This
extra output can be disabled with dc.Verbose = 0. The outputs can be displayed with row labels as the output
name with dc.Result.Outputs.print. MATLAB vectors and matrices containing the result data for outputs
and states can be returned through the dc.outputs and dc.states objects, which will be described later.
A more sophisticated example involves a DC sweep over many voltages:
>>dcsweep = dc.add('DCSweep')
dcsweep.Properties.SweepSource = 'ActuationElectrode';
dcsweep.Properties.SweepSource.ActuationElectrode = 'SweepValues';
dcsweep.Properties.SweepSource.ActuationElectrode.SweepValues.Values = [0:0.5:20,
20:-0.5:0];
dcsweep.run()
Running DC Sweep
Maximum error at iteration 1: dx(23)=-2.911e-003, F(17)=-6.930e-023. Tolerances are:
Tol_dx(23) = 1.000e-006 and Tol_F(17)=1.000e-012.
Maximum error at iteration 2: dx(23)=-1.792e-013, F(14)=-9.839e-033. Tolerances are:
Tol_dx(23) = 1.000e-006 and Tol_F(14)=1.000e-012.
Converged in 2 iterations
...
>>dcsweep.Result.Outputs.print()
1 P_Beam_Tip_z m 3.57623e-30 -7.27078e-10 -2.91106e-09 ...
2 A_Beam_Tip_ry rad -2.34443e-26 3.69583e-06 1.47973e-05 ...
With the dcsweep, only one input can be swept, and all other inputs will retain their fixed value from previous
dc.Properties statements.
Note that if you need to specify many points in the sweep, use LinearByNumberOfSteps, LogarithmicBy-
NumberOfSteps, LinearByIncrement, or LogarithmicByIncrement instead of specifying
SweepValues directly. In this case, the creation and calculation of points will be handled more efficiently.
A dcsweep.Properties.DCSolverSettings.MaximumSolverIterations statement can be
included to increase the number of iterations the solver will attempt to reach convergence for each step. The default is
100. Increasing the maximum number of iterations is often necessary to compute the solution for voltages after pull-
in or release.
DC Sweep is only useful for computing pull-in and release hysteresis in limited cases. See “Computing Pull-in and
Release Hysteresis Curves” on page U2-65 for the recommended techniques for computing these quantities.
Some functions are provided for convenience for plotting the results. For instance by accessing the "outputs" property
object, we can plot all outputs that begin with "P_" on the same graph:
dcsweep.Result.Outputs.plot('P_');
Because there is only one output starting with P_ for this example, the plot produced, shown in Figure 2-4, has just
one curve that clearly shows the tip touching down after pull-in:
Note that the user is then free to modify this plot using the standard MATLAB plot controls. More details on access-
ing the result data will be described later in this document.
Finally, the results of the DC sweep can be opened in the MEMS+ Scene3D module. A result file with a .dc_sweep
extension is written to the same directory where the original schematic resides:
M
From the MATLAB console, the user enters
h = cov.memsplus.Simulation('filename.msim')
h.Analyses.run()
The h.Analyses.run command will run all the analyses in the .msim file in the order they are in the Analyses
tree.
The user can also drag the .msim file from the Current Folder pane into the Command Window to load the simula-
tions:
The script below shows how to access the list of exposed inputs and outputs, as well as the states, from the Simulation
object created from the gyroscope model shown in Figure 2-6:
h = cov.memsplus.Simulation('Gyroscope_exposedZ.3dsch');
h.ExposedConnectors.printWithProperties()
outputs the following:
ExposedConnectors (Tree root)
ElectricalConnectors (ExposedConnectorsGroup)
Ecombbottom (ElectricalConnector) with properties:
DCValue: 0 V
ACSettings:
Magnitude: 0 V
Phase: 0 degrees
Ecombtop (ElectricalConnector) with properties:
DCValue: 0 V
ACSettings:
Magnitude: 0 V
Phase: 0 degrees
Esensing (ElectricalConnector) with properties:
DCValue: 0 V
ACSettings:
Magnitude: 0 V
Phase: 0 degrees
Inputs (ExposedConnectorsGroup)
avx (AngularVelocityInput) with properties:
DCValue: 0 rad/s
ACSettings:
Magnitude: 0 rad/s
Phase: 0 degrees
MechanicalConnectors (ExposedConnectorsGroup)
M1 (MechanicalConnector)
M1_z (TranslationalConnector) with properties:
SourceType:
Force:
DCValue: 0 N
ACSettings:
Magnitude: 0 N
Phase: 0 degrees
>> h.Analyses.getOutputNames()
M
ans =
'P_M1_z'
'Cap1'
>> h.Analyses.getStateNames()
ans =
'M1/x'
'M1/y'
'M1/z'
'M3/x'
'M3/y'
'M3/z'
...
The output from h.ExposedConnectors.printWithProperties() shows that force in Newtons is the
input for exposed mechanical displacements (F_M1_z), voltage is the input for exposed electrical connectors (V_E-
combbottom, V_Ecombtop, V_Esensing), and angular velocity of the reference frame are specified with avx.
Optionally, the position of mechanical displacements can be specified as the input instead of force. This can be done
with
h.ExposedConnectors.MechanicalConnectors.M1.M1_z.Properties.SourceType = 'Position';
h.ExposedConnectors.printWithProperties()
outputs the following:
ExposedConnectors (Tree root)
ElectricalConnectors (ExposedConnectorsGroup)
Ecombbottom (ElectricalConnector) with properties:
DCValue: 0 V
ACSettings:
Magnitude: 0 V
Phase: 0 degrees
Ecombtop (ElectricalConnector) with properties:
DCValue: 0 V
ACSettings:
Magnitude: 0 V
Phase: 0 degrees
Esensing (ElectricalConnector) with properties:
DCValue: 0 V
ACSettings:
Magnitude: 0 V
Phase: 0 degrees
Inputs (ExposedConnectorsGroup)
avx (AngularVelocityInput) with properties:
DCValue: 0 rad/s
ACSettings:
Magnitude: 0 rad/s
Phase: 0 degrees
MechanicalConnectors (ExposedConnectorsGroup)
M1 (MechanicalConnector)
M1_z (TranslationalConnector) with properties:
SourceType:
Position:
DCValue: 0 um
ACSettings:
Magnitude: 0 um
Phase: 0 degrees
>> h.Analyses.getOutputNames()
ans =
'F_M1_z'
'Cap1'
Note the difference between this output and the previous output. M1_z is the position of M1/z, specified in microns
(µm), and the output F_M1_z is the reaction force to M1/z being held at a specified position.
Note that the default units of the Position source is um, which is consistent with the Simulator Exposed Connector
Properties dialog. However, the results will show the input in base SI units (m). For more information on MATLAB
results, see page U2-32.
h.applyWizardActions
For more detailed information about an object, type the objectName.details, as demonstrated below:
>> dc.details
outputs the following:
cov.memsplus.AnalysisItemWithData handle with properties:
Result: []
Contributions: [1x1 cov.memsplus.Contributions]
saveContributions: 0
Verbose: 1
Name: 'DC2'
Type: 'DC'
Parent: [1x1 cov.memsplus.SimulatorCompositeItem]
Document: [1x1 cov.memsplus.Simulation]
Properties: [1x1 cov.memsplus.CompositePropertyElement]
M
Methods, Events, Superclasses
Clicking on the Methods link will generate a list of methods available for the object:
ans =
1.0000e-006
To see the available choices, put the handle to the property element without trailing semicolon:
>> AC.Properties.SweepType
ans =
LinearByNumberOfSteps:
StartFrequency: Start Frequency required but not defined. NaN Hz
EndFrequency: End Frequency required but not defined. NaN Hz
NumberOfPoints: 100
Available choices are: 'LinearByNumberOfSteps', 'LogarithmicByNumberOfSteps', 'Lin-
earByIncrement', 'LogarithmicByIncrement', 'FrequencyValues'; use '' to empty the
selection.'.
To put an empty value into a drop-down menu Properties element:
dc.Properties.SweepSource = '';
M
properties.ExposedConnectorsValues.M2_y = 2
produces the following output:
properties =
ExposedConnectorsValues:
avz: NaN
M2_y: 2
M2_z: NaN
DCSolverSettings:
Tolerances:
RelativeTolerance: 1.000000e-03
AbsolutePositionTolerance: 1.000000e-06
AbsoluteForceTolerance: 1.000000e-12
MaximumSolverIterations: 100
RecursiveIterationDepth: 8
SaveAllIterations: 0
For dynamic properties of a class (such as Properties.), autocomplete is available only after an object of the class
is created. To get a list of Properties arguments for a particular analysis type, first create the analysis, then type
analysisObject.Properties. and hit the Tab key. A list of available arguments will appear, as show below:
For more information on properties, see the section beginning on page U2-16.
ans =
Clicking on DataSet opens a brief help window on the methods and properties for outputs and state data:
M
Our example object has a MATLAB matrix for all the Values. This example has two outputs and 41 voltages in the
DC sweep, so the Values matrix is 2x41. The input voltage values are stored in dc.Result.XValues as a
length 41 vector.
It is generally inconvenient to figure out which rows in the output Values correspond to a certain output of interest.
Instead, it is highly recommended to use
>> v = dc.Result.Outputs.P_Beam_Tip_z
to directly return a vector of data corresponding to a particular output.
Note that dc.Result.Input, .Output, and .State will report values in units of base SI (m).
The order of rows may change when rereading this data from disk in a later session, so hard coding row numbers
into scripts will not work if the data is later reread from disk. Instead, use getByName() to create a robust script
The States property holds the state values for each DC sweep point:
>> dcsweep.Result.States
ans =
For this example, there are 96 displacements and rotations. The States property object stores these states as the
first 48 entries of each column of the Values. The second 48 entries of each column are the time derivatives of all
these states to make a vector of length 48. Thus, the Values above is now a 96x82 matrix because there are 96 states
for this device and 82 voltages in the DC sweep.
Plotting Results
With the MATLAB plot function, the user can specify which signals to plot using the signal name as an argument in
the form of a string. For example,
dcsweep.Result.States.plot('ProofMass_y');
will plot all signals that have 'ProofMass_y' in their name ('ProofMass_y' and 'ProofMass_y_dot').
To plot a single signal, such as ProofMass_y, use
dcsweep.Result.States.plot('^ProofMass_y$');
or call the plot directly on the ProofMass_y field:
dcsweep.Result.States.ProofMass_y.plot();
You can specify the color of plot line and the style of data markers using arguments. For example,
dcsweep.Result.States.ProofMass_y.plot('*r');
specifies that the plot line is red and the data markers are asterisks.
For more information on how to specify plot arguments, line colors and styles, etc., see
http://www.mathworks.com/help/matlab/ref/plot.html
For a transient analysis, you can plot results as they are being computed using the setStateToPlot command
before running the simulation. An example is shown below:
...
tran.setStateToPlot('M1/y');
tran.setStateToPlot('M1/z');
tran.run()
M
You can also specify a range of harmonics; for example: hyst.Result.States.M1_y.plot(3:5)
The above command can be used to load Scene3D files generated from Simulink, Cadence Spectre, or the MEMS+
Simulator in MATLAB for post-processing.
Every simulation performed has an entry in the Analyses pane, and the 3-D results can be viewed by double clicking
the item under each analysis. For certain analyses, the settings used can be displayed by double clicking on the Anal-
ysis item itself. For instance, double clicking on AC1 shows the frequency and voltage settings used for the analysis:
Simulator files as generated above apply to one set of Variables only. If the MATLAB script changed variables
values, then the Scene3D result files will only be visible in the Analyses window for Analysis items after the
variable change.
Simulation data can also be reloaded into MATLAB in a future MATLAB session. First, the Simulator file is opened,
and the result files are automatically loaded to a MEMS+ object in MATLAB. Then the analysis is retrieved by name
and assigned to a MATLAB variable:
>> h = cov.memsplus.Simulation('RFSwitch_prebuilt.msim')
>> ac_old = h.Analysis.DCSweep1()
The results can be accessed as described in Accessing Results using the assigned variable, ac_old.
M
Understanding how each component contributes to maintaining force balance at each degree-of-freedom is an import-
ant tool for building confidence that a MEMS+ model is assembled correctly. Reaction forces and moments are avail-
able as outputs to the DC analysis, but the user can call the Contributions methods to understand how each
component contributes to maintaining force balance at each degree-of-freedom. DC, DC sweep, and transient analy-
ses can track this information as a simulation progresses. To track this information, set the saveContributions
method to true before calling run(). For instance:
>> h2 = cov.memsplus.Simulation('RFSwitch_prebuilt.3dsch');
>> dc = h2.Analyses.add('DC');
>> dc.saveContributions = true;
>> dc.Properties.ExposedConnectorsValues.ActuationElectrode = 13;
>> dc.run();
>> dc.Result.States.Actuation_Pad_Center_z
ans =
Values: -2.6462e-07
Units: 'm'
In the above, 13 volts is applied to the actuation electrode, which causes a z deflection at connector Actua-
tion_Pad_Center of 0.265 microns.
After performing an analysis, Contributions.print can be used to display contributions to the force balance
from each of the components of the Innovator 3D Schematic. This method has the following syntax:
analysis.Contributions.print(stateList, iteration)
stateList (optional): can either be a cell array of state names or a regular expression pattern matching a subset
of the complete list of states. State names can be retrieved with analysis.getStateNames(). Omitting
stateList or putting stateList = {} will print for all states.
iteration (optional): specifies a transient solver iteration or a DC convergence step (if .SaveAllItera-
tions flag was set). If not specified, it will print for all the iterations.
In the example below, we run a DC analysis on the RFSwitch_Damping_ForceContribution.3dsch, with all the beams
set to linear models:
Each line reports the individual force contributions on each connector DOF.
For linear models, LinearComponents is a sum of the elastic restoring force of ALL mechanical components
influencing a particular DOF. For greater granularity, nonlinear components must be used.
Entries such as /ElectroMechanicalModel:/Actuation_Pad/Actuation will differ based on design
and must be interpreted correctly based on the boundary conditions applied. /ElectroMechanicalModel:/
Actuation_Pad/Actuation is the hierarchical representation of the Actuation electrode, which is a child elec-
trostatic element of the Actuation_Pad mechanical component. Thus, /ElectroMechanicalModel:/Actua-
tion_Pad/Actuation reflects the electrostatic force applied by the potential difference between the Actuation
electrode and the Actuation_Pad structure.
True zero values are omitted from Contributions.print. That is, if a component exerts no force whatsoever
on a mechanical connector, that force contribution is NOT reported. This is intuitive, but can be confusing if the
hierarchical relationship between MEMS+ components is not understood.
In the example above, linear beams were used, but if nonlinear beams are used, Contributions.print outputs
the following:
LinearComponents has been replaced by the individual components contributing to the elastic restoring force
applied to a particular DOF. For example, whereas in the linear model report, the force contributions for Actua-
tion_Pad_End1/z included a value from LinearComponents of 3.239e-07 N, in the nonlinear model report, Actu-
ation_Pad_End1/z is shown to be influenced by both the /Actuation_Pad and /Anchor components
contributing an elastic restoring force of -2.0476e-06 N and 2.3715e-06 N, respectively. The sum of these two indi-
vidual contributors is the 0.3239e-06 N reported in the linear case. Nonlinear models MUST be used if this kind a
granularity is required.
While displayContributions can be useful for recovering a overall summary and identifying the names of
force contributors and DOFs in the MEMS+ model, the volume of information for even a few nodes makes the com-
mand inconvenient. However, the command does allow for optional inputs to limit the DOFs reported (single or array
of values is permitted). The syntax and output is as follows:
>> dc.Contributions.print('Actuation_Pad_Center/z');
Actuation_Pad_Center/z ElectroMechanicalModel:/Actuation_Pad/Actuation --> -
1.57458e-06 NonlinearFiniteElementModel:/Actuation_Pad --> 1.57458e-06 Sum of con-
tributions = -5.09141e-14
Actuation_Pad_Center/z_dot Sum of contributions = 0
The contribution from each nonlinear component is stored separately, and the net contribution from each component
and pre-stress are stored as a sum. In the above example, the electrode /Actuation_Pad/Actuation connected to Actu-
ation_Pad_Center/z exerts -1.57458e-6 Newtons in the negative z direction. The nonlinear beam model exerts an
equal and opposite force of 1.57458e-6 Newtons. The precision with which the simulator achieved force balance is
demonstrated in the Sum of contributions, which in this case is several orders of magnitude less than the forces
applied.
M
get
get retrieves the value of the contribution by the specified modelTypeAndName to the state equation for the spec-
ified stateName, similar to Contributions.print.
The syntax for this method is
analysis.Contributions.get(stateName, modelTypeAndName, iterations)
stateName: can be retrieved with analysis.getStateNames()
modelTypeAndName: can be retrieved with analysis.Contributions.ModelsTypeAndName
iterations (optional): specifies a transient solver iteration(s), or a DC convergence step(s) (if .SaveAl-
lIterations flag was set). If not specified, it will get values for all the iterations.
For example:
values = tran.Contributions.get('M1/z', 'NonlinearFiniteElementModel:/LocalFrame3/
LocalFrame1/ArcPlate1');
plot(time,values,'-o');
The above will plot the force over time that the component ArcPlate1 exerts on the z motion of connector M1.
If the model only includes a few mechanical connectors, Contributions.get can be used to calculate the total
electrostatic force in the Z direction:
>> dc.Contributions.get('Actuation_Pad_Center/z','ElectroMechanicalModel:/Actua-
tion_Pad/Actuation') + dc.Contributions.get('Actuation_Pad_End1/z','ElectroMechani-
calModel:/Actuation_Pad/Actuation') + dc.Contributions.get('Actuation_Pad_End2/
z','ElectroMechanicalModel:/Actuation_Pad/Actuation')
ans =
-2.3715e-06
sum
The sum method is used to sum all force contributions by the models specified in modelListOrPattern for all
the states specified in stateListOrPattern, and for all the points specified by iterations.
The syntax for this method is
analysis.Contributions.sum(stateListOrPattern, modelListOrPattern, iterations)
stateListOrPattern: can either be a list of state names, or a pattern matching a subset of the complete list
states. State names can be retrieved with analysis.getStateNames().
modelListOrPattern: can either be a list of models, or a pattern matching a subset of the complete list of
models. Model names be retrieved with analysis.Contributions.ModelsTypeAndName.
iterations (optional): specifies transient solver iteration(s), or DC convergence step(s) (if .SaveAllIt-
erations flag was set). If not specified, it will sum values for all the iterations.
Note that analysis.saveContributions must be set to true for the sum method to work.
For example:
>> values = tran.Contributions.sum('/z','NonlinearFiniteElementModel');
plot(time, values)
The above will plot the force over time that all nonlinear finite elements exert on the z motion of all connectors.
sum is a convenient method for summing all force contributions in a particular direction acting on ANY mechanical
connector from a specified force source. Therefore, we can easily determine the total electrostatic force in Z acting on
the device without having to know the names of the mechanical connectors:
>> Eforce = dc.Contributions.sum('/z','ElectroMechanicalModel:/Actuation_Pad/Actua-
tion');
>> fprintf('Total electrostatic force in Z associated with the Actuation Electrode:
%1.5e\n',Eforce);
Total electrostatic force in Z associated with the Actuation Electrode: -2.37150e-06
Transient Analysis
For a transient analysis, Contributions.print can be used to recover the force contributions on any DOF at
any time during the simulation. The first argument is the DOF of interest; the optional second input is the time
"index". The second term defaults to the first time index "1", which corresponds to t = 0 sec.
tran.Contributions.print('Actuation_Pad_Center/z',100)
Actuation_Pad_Center/z SqueezeFilmDampingModel:/Actuation_Pad/Actuation -->
3.26404e-07 ElectroMechanicalModel:/Actuation_Pad/Actuation --> -3.90578e-06 Non-
linearFiniteElementModel:/Actuation_Pad --> 3.58058e-06 Sum of contributions =
1.20303e-09
Actuation_Pad_Center/z_dot LinearComponents --> -0.00120843 Sum of contributions =
-0.00120843
tran.Contributions.print('Actuation_Pad_Center/z',100) gives the force contributions to the
Z DOF of the Actuation_Pad_Center mechanical connector at time index = 100. time(100) shows that this is 0.02 sec.
Saving contributions for a transient analysis can greatly increase the memory consumption of the MATLAB session
and is not recommended for long transient simulations.
For a more in-depth example of how to extract force contributions, see the section beginning on page T4-95 of the
MEMS+ Tutorials.
M
<state> <binary operator> <value>
you can use analysis.StopCondition.set(). For example, to set a stop condition of M1/x < 0.5e-6 in
a transient simulation, use
transient.StopCondition.set('M1/x', @lt, 0.5e-6);
For the Operator argument, specify the function handle to the binary comparison operation, such as
@lt for <
@le for ≤
@eq for =
@gt for >
@ge for ≥
@ne for ≅
More advanced stop conditions can be defined by deriving a subclass of cov.memsplus.StopCondition;
please contact Coventor support for the details.
ac = dc.add('AC');
ac.Properties.ExposedConnectorsValues.ActuationElectrode.Magnitude = 1; %AC stimulus
ac.Properties.SweepType = 'LogarithmicByNumberOfSteps';
ac.Properties.SweepType.LogarithmicByNumberOfSteps.StartFrequency = 1e3;
ac.Properties.SweepType.LogarithmicByNumberOfSteps.EndFrequency = 1e5;
ac.Properties.SweepType.LogarithmicByNumberOfSteps.NumberOfPoints = 1000;
ac.run();
ac.Result.Outputs.P_Beam_Tip_z.plot(1)
Above, an ACAnalysis object, ac is created from the DCAnalysis object with ac = dc.newACAnalysis(). A
small-signal AC source is placed on the ActuationElectrode. Also the DC voltage used for this analysis has already
been specified as part of the DCAnalysis object. The LogarithmicByNumberOfSteps method creates points
between 1 kHz and 100 kHz with log spacing. For setting the frequencies, the user has the FrequencyValues,
LinearByIncrement, LinearByNumberOfSteps, and LogarithmicByIncrement SweepType
options. The results are computed with ac.run(). The ACAnalysis object has an outputs property just like the
DCAnalysis, so the results can be plotted by name. The .plot function plots the sum of the contributions from all
harmonic output. The .plot(1) command listed in the code above creates a plot of only harmonics 1 (the AC
results):
Note that the user is then free to modify this plot using the standard MATLAB plot controls.
Instead of a DC analysis, the AC small-signal response can also be computed about the final simulation point of other
analyses such as a DC sweep, transient, or pull-in analysis. For instance, the pull-in analysis on page U2-67 computes
the solutions to force balance between 0 volts and 50 volts. Because the simulation ends at 50 volts, the small signal
response for this solution at a DC voltage of 50 volts can be computed by creating the AC object using:
ac = pullin.add('AC');
where pullin is the name of the MATLAB object for the pull-in analysis.
M
>> dc.Properties.ExposedConnectorsValues.ActuationElectrode = 1.0;
>> dc.Verbose = 0;
>> dc.run();
This design has a high level of damping, as can be seen from the values of Q = -abs( π )/(2*real( π )), which are less
than 3 for all but the first mode.
The 3-D shapes corresponding to these modes are automatically written to a Scene3D file in a similar fashion as the
other analysis. Modal analysis Scene3D files have extension .eig.ac. Purely real poles (very overdamped) will appear
with a frequency of 0 in Scene3D.
For systems with unphysically large damping, the pole computation can be inaccurate. For instance, if the
rotational damping on the rigid plate in the Gyroscope tutorial example is set to 1e-3 kg-m-m/s, which is many
orders of magnitude higher than critical damping, then these large values can cause the pole computation to report
other lightly damped modes as overdamped. It is recommended that damping values be kept within physically
reasonable values.
Also, to access the MATLAB vectors and matrices of results, use the Outputs and States properties of the
ACAnalysis object. These work identically to that for DCAnalysis; please see “Accessing Results” on page U2-32 for
details.
If you want to obtain the names of maximum translational degrees of freedom, use:
stateNames = modal1.getStateNames();
indices = modal1.Result.Outputs.MaximumTranslationalDOF.Values;
maximumTranslationalDOFNames = cell(length(indices), 1); % Creates a column vector
% Increment by one and skip purely rotational modes (-1 in indices)
maximumTranslationalDOFNames(indices ~= -1) = stateNames(indices(indices ~= -1) + 1)
'Beam_Tip/z'
'Beam_Tip/y'
'Actuation_Pad_Center/z'
[]
'Actuation_Pad_End1/z'
'Beam_Tip/z'
'Actuation_Pad_End1/y'
'Beam_Tip/x'
'M2/z'
M
[]
The fourth entry is empty because the corresponding mode is a purely rotational one.
Similarly, in a case of purely translational mode, no maximum rotation can be identified.
modal = dc.add('Modal');
modal.Properties.MechanicalOnly = true;
modal.run();
modal.getInfo();
This example returns
DCSweepVariable Example
In the example below, we will use a DCSweepVariable to alter the position of the straight comb figure and calcu-
late the effect vertical displacement has on capacitance and force. The MEMS+ model is shown below:
For the rigid mechanical connector, only the Displacement in z DOF is exposed, and in the script below, we change
this connector to a Position source, and the Zoffset variable is assigned as its value. The Zoffset variable is swept
from -160 to 160 in increments of 2, and the resulting capacitance and electrostatic force is plotted for each Z posi-
tion.
Schem = 'OneComb.3dsch';
h = cov.memsplus.Simulation(Schem);
h.ExposedConnectors.MechanicalConnectors.rigid.rigid_z.Properties.SourceType =
'Position';
h.ExposedConnectors.MechanicalConnectors.rigid.rigid_z.Properties.SourceType.Posi-
tion.DCValue = 'Zoffset';
h.ExposedConnectors.ElectricalConnectors.rotor_rigid.Properties.DCValue = '1';
dcsweepvariable = h.Analyses.add('DCSweepVariable');
dcsweepvariable.Properties.VariableSelectionList='Zoffset';
dcsweepvariable.Properties.VariableSelectionList.Zoffset= 'LinearByIncrement';
dcsweepvariable.Properties.VariableSelectionList.Zoffset.LinearByIncrement.Start-
Value = -160;
dcsweepvariable.Properties.VariableSelectionList.Zoffset.LinearByIncrement.EndValue
= 160;
dcsweepvariable.Properties.VariableSelectionList.Zoffset.LinearByIncrement.Incre-
ment = 2;
dcsweepvariable.Verbose=0;
dcsweepvariable.run;
% capacitance plot
figure(1);
dcsweepvariable.Result.Outputs.Cap_rigid.plot;
grid on;
ylabel('Capacitance (F)');
xlabel('Vertical disengagement (um)');
title('Capacitance vs. Vertical Disengagement')
M
% electrostatic force plot
figure(2);
dcsweepvariable.Result.States.F_rigid_z.plot;
grid on;
ylabel('Vertical force (N)');
xlabel('Vertical disengagement (um)');
title('Vertical Force vs.Disengagement')
The simulation also generates a 3-D result file with a .DCSweepVariable1.dc extension, which can be loaded in
MEMS+ Scene3D:
Vary Analysis
The MATLAB vary analysis corresponds to the Vary analysis available in MEMS+ Simulator (see page R5-26 of
the MEMS+ Reference for more details).
With the vary analysis, the user first defines the variable to sweep and the sweep parameters, and then adds the anal-
ysis that will be run for each step in the variable sweep. In turn, other analyses can be nested under the analysis added
directly to the vary analysis. An example script is shown below, which uses the Gyroscope example included in the
Examples directory of the installation:
clearvars;
clc;
close all;
h = cov.memsplus.Simulation('Gyroscope_prebuilt.3dsch');
% Add an AC under the DC analysis because the DC operating point result will be the
% initial state for the AC analysis
ac = dc.add('AC');
ac.Properties.ExposedConnectorsValues.Ecombbottom.Magnitude = 2;
ac.Properties.ExposedConnectorsValues.Ecombbottom.Phase = 180;
ac.Properties.ExposedConnectorsValues.Ecombtop.Magnitude = 2;
ac.Properties.ExposedConnectorsValues.Ecombtop.Phase = 0;
ac.Properties.SweepType = 'LinearByNumberOfSteps';
ac.Properties.SweepType.LinearByNumberOfSteps.StartFrequency = 6500;
ac.Properties.SweepType.LinearByNumberOfSteps.EndFrequency = 7500;
ac.Properties.SweepType.LinearByNumberOfSteps.NumberOfPoints = 1000;
v.run();
for i = 1:length(ac.Result)
plot(ac.Result(i).XValues, abs(ac.Result(i).States.M1_y.Values(:,2)), 'Display-
Name', sprintf('DC_Bias = %d (V)', i*3));
hold on;
end
set(gca, 'xlim', [6840 6900]);
xlabel('frequency (Hz)');
ylabel('M1_y displacement (m)', 'interpreter', 'none');
set(legend('location', 'northeast'), 'interpreter', 'none');
When this script is executed, it generates a plot, shown in Figure 2-10, of the y degree of freedom on the gyroscope’s
rigid plate results for each vary step. Compare this simulation setup and results with the Simulator setup and results
shown in the Gyroscope Tutorial (see the section beginning on page T2-35 of the MEMS+ Tutorials).
M
Of special note is the plot command used for this simulation:
plot(ac.Result(i).XValues, abs(ac.Result(i).States.M1_y.Values(:,2))
We are plotting the X values (frequency) of each vary analysis versus the absolute values of the M1_y degree of free-
dom. The (:,2) is needed because an AC analysis has two result sets; 1 represents the DC results and 2 represents
the AC results. So with (:,2)the colon tells MATLAB to plot all the rows in the M1_y data table, 2 tells MATLAB
to plot second column (the AC results) of the data table.
Note that the data table for an analysis is available in the MATLAB workspace. If the workspace is not open, enter
workspace in the MATLAB console. The workspace for the AC analysis is shown below:
for Loop
This section demonstrates sweeping a design variable by placing analyses in a MATLAB for loop. It uses nested
for loops to sweep the variable ActuationPad.Length over three values and midlyr_h over three values. It
then plots an exposed output for all nine AC sweeps. It also demonstrates MATLAB script-level plot controls.
Script:
h = cov.memsplus.Simulation('RFSwitch_prebuilt.3dsch');
padLengths = 50:25:100;
Dimple_hs = 0.9:0.1:1.1;
outputName = 'P_Beam_Tip_z'; % output we care about. usually a capacitance.
stateName = 'Beam_Tip/ry'; % an unexposed state to plot (could get this in Scene3D)
% clear a couple figures, get handles to the axes, and set some titles
figure(5); clf; axis5 = gca; hold on; title(outputName,'Interpreter','none');
figure(6); clf; axis6 = gca; hold on; title(stateName,'Interpreter','none');
colors = 'bgrcm'; % line colors to cycle through for plotting
linestyles = {'-',':','-.','--'}; % line styles to cycle through
count = 0;
for k=1:length(padLengths)
h.Variables.ActuationPad.Length = padLengths(k);
for m=1:length(Dimple_hs)
count = count + 1;
% modify variables
h.Variables.Dimple_h = Dimple_hs(m);
fprintf('Working on %s\n',sweepVarsStr);
% Make new DC and AC objects (recycling is not recommended) so we
% get a different item in the tree
dc = h.Analyses.add('DC');
% Use the built-in function matlab.lang.makeValidName
%in order to generate a valid MATLAB name from an arbitrary string
dc.rename(matlab.lang.makeValidName(['DC_',sweepVarsStr]));
dc.Verbose = 0; % don't print iteration information
dc.Properties.ExposedConnectorsValues.ActuationElectrode = 1.0;
dc.run();
ac = dc.add('AC');
ac.Properties.ExposedConnectorsValues.ActuationElectrode.Magnitude = 1;
% AC stimulus, complex amplitude
ac.Properties.SweepType = 'LogarithmicByNumberOfSteps';
ac.Properties.SweepType.LogarithmicByNumberOfSteps.StartFrequency = 1e3;
ac.Properties.SweepType.LogarithmicByNumberOfSteps.EndFrequency = 1e5;
ac.Properties.SweepType.LogarithmicByNumberOfSteps.NumberOfPoints = 200;
ac.run();
% linestyles.
color_line = [colors(mod(count-1,length(colors))+1),linestyles{mod(count-
1,length(linestyles))+1}];
end
end
M
set(lh,'Interpreter','none'); % no Latex interpretation of '_' in legend
% Set x and y axes labels
xlabel(axis5, ac.Result.XNameAbbreviationAndUnit,'Interpreter','none'); % no Latex
interpretation of '_'
ylabel(axis5, ac.Result.Outputs.(strrep(outputName, '/', '_')).Units); % get a unit for
the y-axis label. Only works for inputs and some outputs
It also generates a separate Scene3D file for each of the nine runs.
Users should always set a Rayleigh damping beta value when running transient simulations. If Rayleigh damping is
not set in the imported schematic or defined in the script, simulation performance will degrade as high frequency
modes will be undamped, leading to a small solver timestep and slow simulation time.
Figure 2-12 shows the plot that is drawn as the simulation progresses. It shows the actuation voltage as a function of
time and the tip displacement as a function of time:
M
Because V = t, the device experiences pull-in between 14 and 15 seconds (14-15 V) as expected from the DC sweep
in the section above on DC analysis.
Recall that the <Tab> key in MATLAB can be used to help remember the methods available. The <Tab> key works
with partially completed names, so to recall all the methods for setting up a transient, type tran. and then press Tab:
The next sections provide further details and options for setting up a transient analysis.
>> dc = h.Analyses.add('DC');
>> dc.Properties.ExposedConnectorsValues.Tip = 1;
>> dc.Verbose = 0;
>> dc.run();
ac.Properties.ExposedConnectorsValues.Ecombbottom.Magnitude = -2;
ac.Properties.ExposedConnectorsValues.Ecombtop.Magnitude = 2;
freq = 6870.29;
ac.Properties.SweepType = 'FrequencyValues';
ac.Properties.SweepType.FrequencyValues.Values = freq;
ac.run();
tran = ac.add('Transient')
The above example uses the tutorial Gyroscope model. Two sinusoidal sources of amplitude 2 and 180 degrees out-
of-phase are applied to the combs on opposite sides of the mass, and the sinusoidal steady-state is computed at a fre-
quency around 6870 Hz. This is then used to create the TransientAnalysis object. Both the initial state, x0, and the
input functions, u(t), are taken as the appropriate combination of the AC analysis result and the DC analysis from
which the AC analysis was created. For instance, the AC analysis above came from a DC analysis that had 14.3 volts
on the two combs. The appropriate transient source should then be v(t) = 14.3 + 2 * sin(2*pi*6870*t) for the Ecomb-
top electrode. To see this, use tran.displayInputs():
>> tran.Properties.ExposedConnectorsValues
Ecombbottom: Inherited @(t) 14.3 + 2 * sin(2*pi*6870.29 * t + 3.1415927)
Ecombtop: Inherited @(t) 14.3 + 2 * sin(2*pi*6870.29 * t + 0)
Esensing: Inherited @(t) 0.1
avx: Inherited @(t) 0
M1_x: Inherited @(t) 0
M1_y: Inherited @(t) 0
M1_z: Inherited @(t) 0
M1_rx: Inherited @(t) 0
M1_ry: Inherited @(t) 0
M1_rz: Inherited @(t) 0
The initial state and inputs from the DC and AC analysis objects are copied in the statements tran =
dc.newTransientAnalysis()and tran = ac.newTransientAnalysis(); thus, if the values of
inputs or states are changed on the DC or AC object, the TransientAnalysis object will not have the correct stimuli.
To use those changed values in a transient analysis, either recreate a new TransientAnalysis object from the
changed DC/AC object, or call tran.setInput() appropriately as described later.
The drive frequency in the script above was hard-coded to the frequency 6870.29, which is generally not recom-
mended. Slight changes in the design that change the resonance frequency would leave the script driving at the wrong
frequency. Instead, a modal analysis should be run to compute the resonance frequency and the value extracted from
the modal object:
modal = dc.add('Modal')
modal.run();
freq = modal.Result.Outputs.Frequencies.Values(1);
M
LAB function handle to the Properties() method. With MATLAB function handles, any function can be defined
for use with transient simulation. Extensive MATLAB documentation exists for MATLAB function handles. Search
for "function_handle" in the MATLAB help system. A brief overview will be given here.
Here are common forms for specifying function handles for MEMS+ inputs, with comments explaining their func-
tion:
Anonymous Functions
Simple functions can be easily specified with anonymous functions. For details, see the MATLAB documentation. A
brief overview is given here.
Anonymous functions for MEMS+ inputs must be functions of one variable and are of the form @(varname)
expression where varname is a name that is used in the expression. For example,
f = @(w) 1 - exp(-w/20e-3)
creates a variable f that is a function handle to a function taking 1 input argument. The variable used to define the sin-
gle variable expression is w. The function can be plotted with MATLAB's fplot:
f = @(w) 1 - exp(-w/20e-3);
fplot(f,[0 40e-3])
M
The Coventor source p can also be used to specify an input for transient analysis:
tran.Properties.ExposedConnectorsValues.ActuationElectrode = p;
Another function supplied with MEMS+ is a pulse. To specify the above function with a pulse source,
p = cov.memsplus.sources.pulse;
p.period = 1e-3;
p.delay = 50e-6;
p.width = 500e-6;
p.risetime = 25e-6;
p.falltime = 25e-6;
p.onvalue = 20;
p.offvalue = 0;
fplot(p.func, [0 2000]*1e-6);
set(gca, 'Ylim', [-2 22]);
which produces
If period had been specified as 2e-3, then the second pulse would not have appeared.
ans =
>> myfunc(2e-3)
ans =
6.3212e-001
A function handle for this function can be created by pre-pending an '@' to the name. So to plot it:
>> fplot(@myfunc, [0 80e-3])
which produces
This function can then be passed as an input for transient analysis with
tran.Properties.ExposedConnectorsValues.ActuationElectrode = @myfunc;
Of course it is somewhat inconvenient to have put the time constant and the period as fixed values within the func-
tion. So instead we make a function of three variables:
function v = myfunc(t, mytau, myperiod)
v = zeros(size(t));
for i = 1:length(t)
tp = mod(t(i),myperiod); % modulo period to get time since beginning of cycle
if (tp/myperiod < 0.5)
v(i) = 1 - exp(-tp/mytau); % rising to 1 on first half
else
v(i) = exp( -(tp - myperiod/2)/mytau); % falling to 0 on second half
end
end
end
And then make an anonymous function that sets a particular time constant and period that can be used for transient
analysis:
M
f = @(t) myfunc(t, 2e-4, 40e-3);
tran.Properties.ExposedConnectorsValues.ActuationElectrode = f;
tran = dc.add('Transient');
tran.Properties.TimeSpan.Values = [0 1e-3];
tran.Properties.Tolerances.RelativeTolerance = 1e-4;
index = h.Analyses.getInputIndex('ActuationElectrode')
index =
fplot(tran.Properties.ExposedConnectorsValues.ActuationElectrode.Function,[0 1e-3])
which produces the plot below:
Note that even if the input is set to a constant value, it will be returned as a function handle.
ans =
1.0000e-004
This value can be changed with
>> tran.Properties.Tolerances.RelativeTolerance = 1e-5
Reducing the relative tolerance is particularly important for lightly damped systems when the amplitude of oscillation
is important. For instance, in the Gyroscope tutorial, an error tolerance of 1e-3 creates too much numerical damping,
and it becomes necessary to reduce this tolerance to 1e-4 in order to maintain the amplitude of the oscillation within a
few percent over the nearly 300 periods of oscillation in that simulation.
>> tran.Properties.Solver
ans =
@ode15s
M
>> tran.Properties.Solver = @cov.memsplus.ode.ode23t;
In general, the ode15s solver is recommended for a transient analysis with contact, and it is the default solver. Note
that with this solver, it is recommended to set the Maximum order parameter to 2. The ode23t solver is recommended
for systems with high-frequency oscillations (resonator, gyroscope, scanning mirror, etc.); this solver will avoid
numerical damping of those oscillations. It is a conservative solver, i.e., it favors numerical accuracy over simulation
speed when dealing with stiff problems.
tran.Properties.ExposedConnectorsValues.ActuationElectrode = p;
figure;
tran.run();
Note that when accessing individual DOFs, for states, the DOF is preceded by a backslash (i.e., tran.setState-
ToPlot('Beam_Tip/z'), but for outputs and inputs, the DOF is preceded by an underscore (i.e., tran.setOut-
putToPlot('A_Beam_Tip_ry').
When the tran.run() statement is executed, the figure window will display the specified states, inputs, and out-
puts as the simulation progresses. Here is a screen capture part way through:
New data points are plotted every 100 time steps. To force immediate plotting before the 100 steps have finished, use
the Refresh button. A refresh will also rescale the y-axis if the initial values are significantly smaller than 1, as is the
case for Beam_Tip/z and A_Beam_Tipry above. For efficiency, only new data points are plotted, which means vari-
ous windowing events can cause the early points to disappear. A refresh will redraw the earlier points as well.
The Stop button can be used to stop the simulation.
When the simulation is complete, the plots looks as shown below:
Simulation Results
After simulation, all inputs, outputs and states are available through the States, Outputs, and Inputs properties
as in the other analysis objects. The simulation also creates a MEMS+ Scene3D file to view the solution as 3-D
motions of the device.
In addition, states, outputs, and inputs are all available for plotting or other data analysis. Below we take the z deflec-
tion as a function of time for four different points along the axis of the switch:
s = tran.Result.States;
zTip = s.Beam_Tip_z.Values;
z1 = s.Actuation_Pad_End1_z.Values;
z2 = s.Actuation_Pad_End2_z.Values;
z5 = s.Actuation_Pad_Center_z.Values;
figure
plot(tran.Result.XValues, [zTip, z1, z2, z5]);
M
In the script above, for convenience, we copy tran.Result.States into a variable s. This is only to make the
statements easier to write, and is not necessary because z1 = tran.Result.States.Actua-
tion_Pad_End1_z.Values would work as well.
Results are also written to a Scene3D file with extension .trans. The volume of data written to the Scene3D file can
be reduced by setting the tran.Decimation to a value larger than 1. For instance, a value of 10 would save every
tenth transient point, thus reducing file size by a factor of 10.
The simulation can be extended by increasing the end time and continuing the simulation. Below the simulation con-
tinues until the released switch settles down:
>> tran3 = tran2.add('Transient');
>> tran3.Properties.TimeSpan.Values = [0 2e-3];
>> tran3.run()
If a simulation is interrupted with Ctrl+ C, it may be possible to continue the simulation, using the above procedure.
If you are continuing a transient loop in a for loop, e.g.
for i = 1:1000
tran = tran.add('Transient')
% .. adjust properties ..
tran.run
% filename Transient1.Transient1.Transient1.trans is too long and the script fails
end
the resulting filename may get too long, and the simulation will terminate. To avoid this situation, use
tran = tran.move('childOf', h.Analyses.DC1)
in order to shorten the result filename length.
For information on how to troubleshoot a MATLAB transient simulation, see page U5-8.
M
Pullin Analysis: easy to set up, captures multiple pull-in/release and hidden states, requires effort to interpret
results (this is the recommended technique)
Slow Transient Analysis: requires effort to set up, usually solves, but can have transient artifacts
DC Sweep
In “Creating and Running an Analysis” on page U2-22, the following script was used to sweep the voltage in 0.5 volt
steps from 0 to 20 volts:
dcsweep = dc.add('DCSweep');
dcsweep.Properties.SweepSource = 'ActuationElectrode';
dcsweep.Properties.SweepSource.ActuationElectrode = 'SweepValues';
dcsweep.Properties.SweepSource.ActuationElectrode.SweepValues.Values = [0:0.5:20];
dcsweep.run();
dcsweep.Result.Outputs.print();
dcsweep.Result.Outputs.plot('P_');
xlabel('Voltage');
ylabel('Displacement (um)');
The position of the tip of the switch showing pull-in between 15 and 15.5 volts is below:
The script succeeded, but with other designs, the maximum solver iterations may need to be increased from the
default value of 100 because near pull-in, the solver may need more than the default 100 iterations to converge.
To compute a full pull-in hysteresis curve, you can specify up and down values:
dcsweep1 = dc.add('DCSweep');
dcsweep1.Properties.DCSolverSettings.MaximumNumberOfIterations = 200;
dcsweep1.Properties.DCSolverSettings.Tolerances.RelativeTolerance = 1e-04;
dcsweep1.Properties.SweepSource = 'ActuationElectrode';
dcsweep1.Properties.SweepSource.ActuationElectrode = 'SweepValues';
dcsweep1.Properties.SweepSource.ActuationElectrode.SweepValues.Values = [0:0.15:20,
20:-0.15:0];
dcsweep1.run();
dcsweep1.Result.Outputs.plot('P_');
xlabel('Voltage');
ylabel('Displacement (um)');
Note that with this simulation, you have to increase the DC solver iterations and reduce the relative tolerance.
The plot shows that pull-in occurs around 15 V, and release occurs around 14.9. These results can be viewed in
MEMS+ Scene3D:
As a side note, it is recommended that the MATLAB plot commands be used to plot individual displacements and
rotations for hysteresis curves rather than the Scene3D plotting tools. Also note that the Scene3D animation slider
cannot be used to move the animation frame to an arbitrary voltage in the sweep because the hysteresis curve is multi-
valued for a given voltage. Instead use the Play, Backward One Frame and Forward One Frame controls. The Show
Each Simulation Point option is recommended as well.
The above example highlights the simplicity of setting up the DC sweep. If you have difficulties attaining the
expected results, first try increasing the number of iterations. Second, try reducing the relative tolerance.
Pull-in Analysis
This section describes the pull-in analysis functionality that computes pull-in and release voltages and the behavior of
the device between and beyond those voltages. It avoids the challenges of a DC sweep by using an independent vari-
able, assigned the name of lambda, to follow the curve of solutions to force balance rather than compute the solution
M
to force balance at given voltages. Pull-in analysis will almost always compute the first pull-in and release voltages
with the default settings. Secondary pull-in and release may require changing settings as will be described below. For
background information on the pull-in analysis, see page R5-17 of the MEMS+ Compact Modeling Reference.
To demonstrate calculating the first pull-in and release, we will use the RF Switch tutorial in the Examples directory
of the MEMS+ installation.
h = cov.memsplus.Simulation('RFSwitch_prebuilt.3dsch');
dc = h.Analyses.add('DC');
dc.run();
pullin = dc.add('PullIn');
% Sweep variable is generic 'lambda' and V_ActuationElectrode = lambda
pullin.Properties.ExposedConnectorsValues.ActuationElectrode = 'lambda';
pullin.Properties.ArcLengthContinuation.LambdaDomain.InitialValue = 0; % start here
pullin.Properties.ArcLengthContinuation.LambdaDomain.MaximumValue = 50;
pullin.Properties.ArcLengthContinuation.LambdaDomain.MinimumValue = 0;
pullin.run();
% Plot results in the same plot window
subplot(2,1,1), pullin.Result.States.Actuation_Pad_Center_z.plot();
subplot(2,1,2), pullin.Result.States.Beam_Tip_z.plot();
The script generates the following figures from which pull-in can be identified:
Collapse onto
Pull-in
actuation electrode
Full release
Beam_Tip/z is a point on the beam tip and Actuation_Pad_Center/z is a point on the actuation electrode. Wherever
the curve has an infinite slope is an instability, and the first instability is pull-in.
Continuing to trace the curve beyond the sharp corner at release may require tuning the parameters so the simulator
more precisely follows the curve. One way to accomplish this is to define step size\minimum and maximum values.
Reducing the relative tolerance allows less error in finding a solution for each point along the curve. For more infor-
mation on the Pull-In analysis parameters, see page R5-19 of the MEMS+ Compact Modeling Reference.
Viewing Settings
As with other objects, typing just the name of the MATLAB variable for the object will show its properties. Below we
show the result for the object from the first run of this section and are primarily the default settings.
>> pullin
pullin =
pullin = dc.add('PullIn');
...
M
Size.MaximumValue property. For example:
pullin.Properties.ArcLengthContinuation.StepSize.InitialValue = 10;
pullin.Properties.ArcLengthContinuation.StepSize.MaximumValue = 10;
Other factors can limit the step size as well which will be described below.
h.Variables.beta = 1e-06;
dc = h.Analyses.add('DC');
dc.run();
% Make a Coventor Piecewise-linear source and plot the function for confirmation
p = cov.memsplus.sources.pwl([0 20 40],[0 20 0]);
fplot(p.func,[0 40]);
Note that we are increasing the value of the beta variable because we are running a slow transient analysis. The goal
of a slow transient analysis is to simulate the quasi-static state; thus, inertial effects are not wanted and can be damped
out by increasing the beta value (Rayleigh damping).
M
The curves above show pull-in around 15 seconds, which corresponds to 15 volts. And release is around 25 seconds,
which is around 15 volts. The raw data can be extracted to plot a typical hysteresis curve:
z = tran.Result.Outputs.P_Beam_Tip_z.Values;
v = tran.Result.Inputs.V_ActuationElectrode.Values;
plot(v,z);
The MATLAB data tips have been added above to show the pull-in and release voltages of 14.04 and 14.96, respec-
tively, which correspond well to the values determined in the previous section.
Note that at release, the tip overshot its steady-state value and then oscillated at its resonance frequency. This can be
seen by zooming in to the region around release on the original transient result of Figure 2-16:
The overshoot makes the hysteresis curve misleading but even worse, it can make the simulation take unnecessarily
long to complete, especially for more complex designs. This transient behavior is not of interest for determining static
instabilities, so damping can be added to the design to eliminate these oscillations. Because this is a slow transient,
damping well above what is physical can be set. To that end, we can increase the Rayleigh damping beta coefficient
to 1e-5:
h.Variables.beta = 1e-05;
dc = h.Analyses.add('DC');
dc.run();
% Make a Coventor Piecewise-linear source and plot the function for confirmation
p = cov.memsplus.sources.pwl([0 20 40],[0 20 0]);
fplot(p.func,[0 40]);
z = tran.Result.Outputs.P_Beam_Tip_z.Values;
v = tran.Result.Inputs.V_ActuationElectrode.Values;
plot(v,z);
And rerun this simulation. The result is a much faster simulation and a cleaner result without overshoot:
M
The pull-in and release voltages are different compared to the results with the 1e-06 beta value. Zooming in to when
the release first occurred and turning on symbols we see
Note that the simulator took very few time steps in this very important region. Tightening the relative tolerance forces
the simulator to more carefully navigate this region and produces pull-in and release voltages that match the pull-in
and release voltages computed in Pullin Analysis of the previous section:
tran.Properties.Tolerances.RelativeTolerance = 1e-5;
tran.run();
Increased damping can make the simulation take much less time, however, too much damping will slow the motion at
the instabilities making it difficult to determine the voltage of the instability. For instance, if the Rayleigh damping
beta property is further increased to 1e-2, the simulation finishes very quickly. However, there is no longer a vertical
drop at pull-in, so it is not clear where to probe the curve or whether there is even an instability at all.
M
The x-axis is the frequency, and the y-axis is the amplitude of motion of the proof mass in the y-direction. Each curve
is for different amplitudes of voltage applied to the combs. As the amplitude grows, two effects occur: First, the
device appears to stiffen because the peak frequency gets larger; this stiffening is consistent with stress stiffening
from large amplitude beam bending. Second, the curves starts to look like a breaking ocean wave for the larger ampli-
tudes, which describes a hysteresis effect. For frequencies underneath the breaking wave, there is more than one pos-
sible amplitude of oscillation. The actual amplitude of oscillation depends on the path to reach the frequency in the
multi-valued region. If the frequency is increased from a low frequency to a frequency in the multi-valued region, the
highest amplitude of motion will be realized. If the frequency is decreased from a frequency higher than the multi-
valued region, the lowest amplitude will be realized. Predicting this response is important to the design of devices
meant to operate in or avoid this multi-valued region.
to have only non-negative coefficients while preserving Q = 1500 for the mode of interest:
% Change all components of type Beam to nonlinear
d = cov.memsplus.Schematic('Beams_prebuilt.3dsch');
%
% Get all objects of the type Beam
objects = d.Components.filterByType('^Beam$');
h = cov.memsplus.Schematic('Gyroscope_prebuilt.3dsch');
objects = h.Components.filterByType('^SubSchematic$');
for i = 1:length(objects)
objects(i).Properties.SchematicFile = 'Beams_nonlinear.3dsch';
end
modal = dc.add('Modal');
modal.run();
hyst.Properties.ArcLengthContinuation.FrequencyDomain.InitialFrequency = firstFreq;
hyst.Properties.ArcLengthContinuation.FrequencyDomain.MinimumFrequency = firstFreq;
hyst.Properties.ArcLengthContinuation.FrequencyDomain.MaximumFrequency = lastFreq;
hyst.run();
figure;
hyst.Result.States.M1_y.plot();
% Report results
fprintf('First Resonance: %g, Q=%g\n',modal.Result.Outputs.Frequencies.Val-
ues(1),modal.Result.Outputs.Q.Values(1));
fprintf('Instability Frequencies for amplitude 3:\n');
hyst.Instabilities;
which creates the following plot:
M
Figure 2-20 With AC Magnitude = 2
ans =
1.0e+03 *
6.8791 6.8763
This portion of the simulation is before any angular rate is applied and thus every signal should be in its steady-state.
From the figure above, the drive mode, M1/y, is clearly in its steady-state; however, the sense mode, M1/z and thus
the capacitance as well, appear to contain a second frequency in addition to the drive frequency. Because AC analysis
only computes the content at the drive frequency, these signals cannot possibly be at their steady-state.
If determining the true, nonlinear sinusoidal-steady-state is desired, the hysteresis analysis of this section should be
used to initiate the transient instead of an AC analysis. To do so, first we look at the harmonic content of M1/z with
hyst.Result.States.M1_z.plot();
M
Note that the dominant harmonics are now the even harmonics (2, 4). This is because the levitation force that moves
the device in the z-direction is a nonlinear even function of the drive amplitude, i.e., f(y) = f(-y), which is described
more below. To see the impact on the initial cycles of the transient analysis, the script below starts a transient analysis
from the peak frequency of the first hysteresis analysis done above:
outNames = h.Analyses.getOutputNames();
tranhyst.setOutputToPlot(outNames{1}); % Cap1_E6Esensing
tranhyst.run();
which generates the plot below:
Now it is clear M1/z and the capacitance are in their steady-state, which is at twice the frequency of the drive as
expected because the second harmonic is the dominant non-zero harmonic. To understand intuitively why the M1/z is
at twice the drive, note that the levitation force is always positive and grows significantly as each set of comb fingers
increases its overlap with the electrode underneath. This overlap occurs twice per drive cycle: once for positive M1/y
as the top comb overlap increases, and again for negative M1/y as the bottom comb overlap increases. Because this
positive force occurs twice per cycle, M1/z will be at twice the drive frequency.
for i = 1:3;
vary.DC1.FrequencyHysteresis1.Result(i).States.M1_y.plot();
hold on;
end
% Set legend and legend handle
hleg = legend('Vary1\_Harmonic1', 'Vary1\_Harmonic2', 'Vary1\_Harmonic3', 'Vary2\_Har-
monic1', 'Vary2\_Harmonic2', 'Vary2\_Harmonic3', 'Vary3\_Harmonic1', 'Vary3\_Harmon-
ic2', 'Vary3\_Harmonic3');
% Set legend font and location
set(hleg,'FontSize',8, 'Location','northeast')
M
Modifying Settings
Frequency hysteresis has the settings AbsoluteForceTolerance, RelativeTolerance, MaximumNum-
berOfIterations, MaximumLengthOfStateVector, and MaximumNumberOfIterations, which
operate identically to those in the pull-in analysis. Please see “Pull-in Analysis” on page U2-67 for details on these
settings.
end
end
methods (Hidden)
function computeCallback(obj)
obj.preCompute(); % Required
obj.postCompute(); % Required
end
end
end
M
Users can add a DC, DCSweep, or Modal analysis to a Model Reduction object. Analyses can also be nested under
the DC and DCSweep objects nested under the Model Reduction object. The results for these analyses can be loaded
into MEMS+ Scene3D.
Reduced-order models do not include contact models, so they cannot be used to model pull-in and lift-off
phenomena.
2.7: Help
2.7.1: Help on Classes
In addition to this document, users can get help on the MEMS+ classes in the MATLAB console, by entering
doc cov.memsplus.ClassName
Use the TAB key after doc cov.memsplus. to select the desired class.
For a complete list of MEMS+ classes, enters
help cov.memplus
which displays the list of class with a brief description of each in the MATLAB console, as shown below:
M
Clicking on the class name will open more detailed documentation about the class.
2.8.1: Memsplus
This class of commands is used to create and/or access MEMS+ documents.
Command Page
MaterialDatabase U2-4
Process U2-4
ComponentLibrary U2-4
Schematic U2-4
Simulation U2-8
Result U2-8
2.8.2: Document
The commands listed in this section can be used on any file created in MEMS+.
Command Page
save U2-9
saveAs U2-9
saveAsProject U2-9
saveAndOpenInMEMSp U2-10
exportZip U2-10
reload U2-10
compareTo U2-19
2.8.3: Items
Command Page
add U2-14
delete U2-15
details U2-85
move U2-15
copy U2-15
rename U2-4
M
expose
unexpose
filterByType U2-13
filterByName U2-13
getChildrenNames U2-14
compareTo
getInfo U2-12
print U2-12
printWithProperties U2-12
update
2.8.4: Properties
Command Page
get U2-17
set
reset
getErrors U2-17
getChildrenNames U2-14
Parent U2-14
compareTo U2-21
update
2.8.5: Arrays
Command Page
Values
2.8.6: ComponentLibrary
Command Page
exportMPDK U2-10
2.8.7: Innovator
Schematic
Command Page
applyWizardActions U2-28
exportGDS U2-10
exportACIS U2-10
exportToCoventorWare U2-10
Components
Command Page
mirrorAboutLocalX
mirrorAboutLocalY
replicate
group
getMechanicalConnectors U2-17
getElectricalConnectors U2-17
getFluidicConnectors U2-17
getOutputs U2-17
importAsRigidPlate U2-7
importAsPolygonSegment U2-8
Command Page
InitialPosition U2-21
connect U2-22
disconnect U2-22
fix
release
M
getComponents U2-21
2.8.8: Simulator
Analyses
Command Page
run U2-22
runRecursively U2-32
setInputToPlot U2-61
setStateToPlot U2-61
setOutputToPlot U2-61
StopCondition U2-41
Verbose U2-28
Decimation U2-63
getInputNames U2-26
getUnprefixedInputNames U2-28
getStateNames U2-26
getOutputNames U2-26
getInputUnits U2-26
getStateUnits U2-26
getOutputUnits U2-26
getDisplacementStates
getVelocityStates
getMechanicalStates
getNumInputs
getNumStates
Command Page
getNumOutputs
getInputIndex U2-59
getStateIndex
getOutputIndex
Command Page
Instabilities U2-67
Result
Command Page
openInMEMSp U2-10
Datasets
Datasets are result matrices, for example, dc.Result.States.
Command Page
Values U2-32
Units U2-32
nElements
nXValues U2-32
getValuesContaining U2-32
getIndicesContaining
Command Page
sum U2-39
get U2-39
print U2-37
SystemMatrices
Command Page
getA
getB
getC
getD
getE
getY
M
getModelOutputsY
getModelOutputsC
getModelOutputsD
getRHS
getRHSReference
getRHSContributions
getRHSScaling
getStateScaling
2.8.9: Utilities
Command Page
assertCompatibleMatlabVersion U2-83
codeUpdater U2-1
deleteSimulationFiles U2-11
enableMixedJacobian U2-83
findSimilarModes U2-83
getAbsolutePath U2-83
getPositionOfMechanicalConnector U2-83
python U2-83
rdir U2-83
SystemInfo U2-83
updateMEMSpFiles U2-4
Command Page
system('filepath') U2-10
2.9: References
1 S. D. Senturia, Microsystem Design. Boston, MA: Kluwer Academic, 2000, p 134.
M
2. In the Simulink Library Browser that opens, select the New Model icon. If you have configured Simulink cor-
rectly, a MEMS+ menu appears in the interface.
3. Select the MEMS+ > Import MEMS+ Model or use the Alt + I shortcut.
4. In the Open dialog, navigate to the location of the MEMS+ .3dsch file, click on the desired file to select, then
click on Open. The MEMS+ model will appear as a block with the MEMS+ logo. The block can then be
rotated, flipped, moved, and connected to other Simulink blocks.
The document location can be specified as an absolute path or a path relative to the current MATLAB folder. If you
want to associate a Simulink block with another MEMS+ model, point the MEMS+ document location to the new
model location and name. After modifying the path to MEMS+ model, select MEMS+ > Update MEMS+ models
from the Simulink main menu, or use the keyboard shortcut Alt + U.
Only a valid MEMS+ document path will be effectively applied. Otherwise, an error message will appear, and the
previous MEMS+ document path will still be used.
M
The imported MEMS+ device model also has all the parameters that were exposed in MEMS+ Innovator. To view
these parameters, in the Simulink interface double click on the MEMS+ symbol, or right click on the symbol and
select Mask Parameters.
Z=5
Once the MEMS+ model is imported, the system designer can complete the system model using blocks from the Sim-
ulink library.
AC Frequency: The user enters a frequency for which the solver will generate a result that acts as an input
variable for a transient simulation. The acInit variable is saved in the user’s workspace and can be used to
start a transient simulation from steady state; for an example, see page T2-58 of the MEMS+ Tutorials.
The AC Inputs tab allows you to input AC mag values on any sources in the model.
To run and view the AC and modal analyses, use the Control Design Toolbox application; see page U3-
11 for more details
M
To start a transient analysis from an initial DC or AC point, open the MEMS+ function block’s parameters dialog,
and configure one or both of these simulations from there; see page U3-5 and page U3-6 for more details.
When running a transient simulation, keep the following in mind:
The Rayleigh damping beta value should always be defined in the imported MEMS+ schematic. If Rayleigh
damping is not included in the model, simulation performance will degrade as high frequency modes will be
undamped, leading to a small solver timestep and slow simulation time.
Pick a stiff solver: ode15s (Gear) for faster convergence and less accurate results, ode23t (Trapezoidal) for
smooth graphs, but longer simulation time.
The ode15s solver is recommended for a transient analysis with contact. Note that with this solver, it is
recommended to set the Maximum order parameter to 2.
The ode23t solver is recommended for systems with high-frequency oscillations; this solver will avoid
numerical damping of those oscillations. It is a conservative solver, i.e., it favors numerical accuracy over
simulation speed and dealing with stiff problems.
Users do not have to explicitly set the solver. MATLAB has a default auto option that is usually sufficient.
If the auto option results in difficult convergence or too long of a simulation time, you can set the solver
to ode15s or ode23t.
Set a reasonable simulation end time (a few milliseconds is often enough).
If you are not interested in Scene3D result files, select Save None in the MEMS+ Simulink block parameters.
If some of the blocks do not provide an analytical Jacobian, Simulink computes Jacobian numerically for all
the blocks in the system, which will significantly slow down a simulation including a MEMS+ model. There-
fore, a good practice is to check that the Sparse analytical Jacobian option is specified in the simulation con-
figuration and that a warning about changing the Jacobian type does not appear during the simulation. If this
is the case, a workaround provided by Mathworks can be used in order to use mixed numerical/analytical
Jacobian inside the same system.
If simulation does not converge,
try relaxing relative tolerance;
try increasing the minimum step size, but also increase the number of consecutive violations allowed
(several thousands is not too much);
change order of the Gear method (ode 15s);
try another solver, but stay with variable-step, stiff solvers.
Transient simulation time is available in the Diagnostic Viewer; see page U3-9 for more details.
While visualizing the results in a scope, do not forget to uncheck the Limit Data Points To Last option on the
Data History tab of the Scope Parameters dialog.
For more information on troubleshooting a transient simulation, see page U5-8.
If you select the Save all with decimation defined below, enter a Decimation value to limit the result file output. For
example, if you enter a Decimation value of 10, the solver will save every tenth transient point, thus reducing file size
by a factor of 10.
Note that the Control System Toolbox and Simulink Control Design toolbox require additional MATLAB license
features. Please contact your MathWorks support representative for more details.
To access the Control and Estimation Tools Manager, in the model window, select Analysis > Control Design > Con-
trol System Designer; if you do not have this option, then you do not have a license for this feature or you have not
installed these toolboxes. In the dialog that opens, select Operating Points in the Workspace panel, and then click on
the Compute Operating Points tab. To perform the OP computation, be sure to check Known for all the Simulink
Inport block values. This setting tells the OP search algorithm that these values are not allowed to vary (see Figure 3-
6).
The user may need to tune the OP Search settings in the Tools/Options dialog to obtain optimal convergence. For this
particular simulation, the constraint tolerance has to be changed to 3.0e-05 in order for the simulation to complete.
M
3.4.2: AC and Modal Analysis
The Control Design toolbox can be used to compute linear frequency domain analysis, and then output a Bode plot or
pole/zero map. A linear Bode plot shows the linearized system's frequency response (usually magnitude and phase,
magnitude being the ratio between the output and the entry in SI units). An AC analysis is typically a linear analysis
of the system's frequency response for a specific AC stimulus. So the linear Bode plot capability of Control Design
Toolbox can be used to generate and view AC results.
A pole/zero map is a plot of the poles of the system in the real/imaginary map. A modal analysis computes the poles
of the linearized system. So the zero/pole map capability can be used to generate and view modal results.
The linear analysis tool is accessed from Analysis > Control Design > Linear Analysis:
There are two algorithms that can be used for linearization: Block-by-block analytic and Numerical perturbation. You
can select one or the other algorithm from the Linearization tab, which is accessed by clicking on More Options (see
Figure 3-7).
In terms of results, the Block-by-block analytic linearization is more accurate, and Coventor recommends this algo-
rithm. The Numerical perturbation linearization also produces good results for MEMS+ models, provided the Rela-
tive perturbation level parameter is set to a value between 1e-8 and 1e-12; the latter will give optimal results in most
cases.
M
Figure 3-8 Linearization Input and Output Points
Linearization
annotations
AC Results
We will use the default operating point for our linearization, assuming it is the correct DC point with respect to the
bias settings.We are ready to linearize the system. We will ask for a Bode plot of the resulting SISO transfer function,
then click on the Linearize icon.
If we want to compare our results to MEMS+ Simulator resonant frequency results, we can right click on the Bode
plot and select Properties, then change the Frequency units to kHz:
The default values of the Units settings can be configured in the dialog that appears on typing ctrlpref in MAT-
LAB; this method resets the default values so the user no longer needs to set them again for each Bode plot.
Right click again on the plot and select Characteristics > Peak Response. Click on the peak of the Magnitude plot to
mark the resonant frequency in Y. The results match the resonant frequency results we generated for the gyroscope
tutorial (see page T2-33 of the MEMS+ Tutorials).
M
It is possible to transfer the linearization result to the MATLAB workspace with a drag and drop of lynsys1. Then
the user can use lynsys1 in the MATLAB console with the bode() function and specify the frequencies of inter-
est.
Modal Analysis
The Linear Analysis tool also allows the user to perform a zero/pole map of the linearized schematics. A pole/zero
map is a plot of the poles of the system in the real/imaginary map. A modal analysis compute the poles of the linear-
ized system, so it is possible to generate modal results with the zero/pole map capability of Control Design Toolbox,
as illustrated below:
M
If you already have a technology library created:
1. From the Library Manager, select the desired technology library from the Library pane.
2. Select MEMS+ > Import Innovator 3D Schematic.
3. Browse to select the Innovator schematic that you want to import.
4. In the Import options dialog that opens, edit the cell name if you want, and choose one or more of the follow-
ing options:
Layout: Check this option if you want to generate a P-Cell from the schematic.
Model: Check this option if you want to generate the Cadence Spectre models from the schematic.
Local: Check this option if you want to create a local copy of the 3-D schematic and its associated process
and material database files within the newly created cell’s directory. This option makes it easier for users
to share designs because the cell will contain the needed 3-D schematic, as well as the Virtuoso informa-
tion. Note that this option alters the search for schematics when the Absolute option is unchecked; see
“MEMSPLUS_SCHEMATIC_PATH Environment Variable” on page U4-5.
Absolute: This option is checked by default, and when checked, the location of the imported Innovator 3-
D schematic is stored using an absolute path. To only have the name of the 3-D schematic remembered
and the actual path resolved at simulation time, uncheck this option, and set the MEMSPLUS_SCHE-
MATIC_PATH environment variable, as described on page U4-5, to the location of the 3-D schematic or
libraries defined by the Local option.
5. Click on OK.
If you checked the Layout and Model options, the cell you just created will have a layout, spectre, and symbol view.
If you do not already have a technology library:
1. In the Library Manager window, select MEMS+ > Create Tutorial Tech Lib from Process.
2. In the dialog that opens, enter a name in the New Technology Library Name field, and then use the Browse
button beside the process field to select a MEMS+ process file. Click on OK.
3. Select the tech library you just created.
4. Select MEMS+ > Import Innovator 3D Schematic.
5. Browse button to select the Innovator schematic that you want to import.
6. In the Import options dialog, edit the cell name if you want, and leave the Layout, Model, and Absolute
options checked. Click on OK.
7. After you have imported the MEMS+ model, from the Library Manager, open the layout and symbol view to
make sure it has been imported correctly.
Although MEMS+ allows file names with spaces, Virtuoso may not handle these file names correctly. If you are
going to be working in Cadence, Coventor recommends that you name your schematic and the files it depends on
without any spaces.
M
on Save.
Cadence reports when the archive is successfully created.
The created archive will include all the files needed to run a simulation (.scs, .mmdb, .mproc and .3dsch files) as well
as any saved analysis cell views.
When an archive is imported, any MEMS+ simulation results will be written to the directory where the archive files
were saved instead of the location specified in the MEMS+ > Options dialog with the Scene3DfileBasename
parameter.
Create layout
Creates the PCell layout.
Create model
Creates the Cadence Spectre model from the MEMS+ schematic.
M
Layer-purpose pair for error reporting
When the PCell generation fails, errors are reported in the Command Interpreter Window (CIW). (See page U4-
11 for more information on PCell generation.) A marker indicating an error occurred is drawn on the layer-purpose
pair specified here. Note that the layer-purpose pair is saved in the PCell when importing or refreshing the MEMS+
cell. If you want a new layer-purpose pair to be used in an existing cell, please refresh this cell.
In this example, the 3D schematic file to be imported resides in the directory /home/my3dschs/SomeDesign.3dsch,
and the search path will not assume a Library and Cell name.
If there are multiple library locations on a Linux machine, these can be ":" separated.
Note the difference from the Local option mentioned previously. For a cell that was imported with Local, the Library
and Cell name were appended to the path to find the .3dsch file. Without the Local option, the search path is expected
to be the exact location of the .3dsch file.
With or Without the Local Option and With the Absolute Option
Regardless the status of the Local option, if the Absolute option is checked, the absolute location of the 3-D schematic
file (whether local to the cell or not) is referenced in the layout and/or model definition. The MEMSPLUS_SCHE-
MATIC_PATH environment variable is not used.
Variables exposed
in MEMS+
UseSimulatorTemperature Setting
All MEMS+ models have a temperature variable exposed (T) defining the temperature used to compute thermal
effects on a MEMS+ device. Cadence simulators have their own temperature variable that can be modified or swept
through the Analog and Design Environment [ADE]. When UseSimulatorTemperature is set to no (default value), the
MEMS+ temperature and the Cadence Simulator temperature are treated as independent of one another. Varying the
Cadence simulator temperature during a simulation will not have any impact on the MEMS+ device.
When UseSimulatorTemperature is set to yes, MEMS+ models will ignore the value of the exposed parameter T and
use the temperature defined by the Cadence simulators instead. Note that the default temperature of MEMS+ (which
M
generally is also the zero-stress temperature of materials) is 273.15K, but the default temperature of the Cadence sim-
ulators is 300.15K. This could lead to unexpected thermal stresses being computed when MEMS+ models are set to
use the Cadence simulators temperature.
4.2.2: Ports
The MEMS+ model symbol in Cadence Virtuoso includes pins that represent various ports exposed in Innovator. All
pins in Cadence are electrical pins. For each quantity, we use a scale factor to convert it to a voltage or current. Some
of these scaling factors are exposed in Innovator’s top-level Components properties (see page C2-1 for more details).
All others (referred to as a default scale factor below) are a 1-to-1 conversion from SI units to voltage/current. The
ports in Innovator are imported and scaled in Cadence as listed below:
exposed electrical ports in Innovator > electrical input/output pin in Cadence
Across value units: volts [V], no conversion needed
Through value units: amperes [A], no conversion needed.
exposed mechanical ports > electrical input/output pin
Across value units: from meters [m] to [V] with the position scale factor;
from radians [rad] to [V] with the position and the rotation scale factors.
Through value units: from newtons [N] to [A] with the force scale factor;
from newtons meter [N.m] to [A] with the force and the rotation scale factors.
exposed fluidic ports > electrical input/output pin
Across value units: from pascals [Pa] to [V] with the pressure scale factor.
Through value units: from [m3/s] to [A] with the flow rate scale factor.
exposed input ports > electrical input pin (infinite impedance to the ground)
Across value units: from [m/s2] to [V] with the acceleration scale factor;
from radians per second [rad/s] to [V] with the velocity and the rotation scale factors
Through value: ignored.
exposed output ports > electrical output pin (ideal controlled voltage source)
Across value units: from farads [F] to [V] with a default scale factor of 1
from siemens [S] to [V] with a default scale factor of 1.
Through value: ignored.
Figure 4-2 illustrates how electrical connectors, input pins, and output pins exposed in Innovator are represented in an
imported MEMS+ model in Cadence. Ports are gathered by type: input ports on one side, input/output ports on
another side, and output ports on a third side.
If the unit scale factors of the Top-level Components of MEMS+ Innovator are defined using exposed variables, the
quantity functions are not defined and cannot be used.
For instance, if you exposed the acceleration of the reference frame in z direction on your MEMS+ device, and want
to impose an angular velocity of 1 radians/s, then you can connect a voltage source to the exposed pin and set its
value to angularVelocity(1), as demonstrated below:
M
The following functions are available to scale parameters to their appropriate value:
displacement(value): from [m] to [V]
rotation(value): from [rad] to [V]
translationalVelocity(value): from [m/s] to [V]
angularVelocity(value): from [rad/s] to [V]
translationalAcceleration(value): from [m/s2] to [V]
angularAcceleration(value): from [rad/s2] to [V]
force(value): from [N] to [A]
moment(value): from [N.m] to [A]
pressure(value): from [Pa] to [V]
flowRate(value): from [m3/s] to [A]
Support for custom labels is dependent on the selected output format for Spectre's results. PSF format is
recommended. SST2 and PSFXL might not display the labels as shown below.
For signals with a one to one conversion from SI units to voltage/current, the conversion is transparent to the user.
Figure 4-3 shows the result of a capacitance plot, clearly identifying the signal with its prefix and units: femto-Farad.
Signals using scale factors indicate the conversion factor from volts to the unit with prefix displayed, as shown in Fig-
ure 4-4. The curve is still scaled in volts, but the marker reads 1.848185 mm/s x100 for I0.M1vy at 7.0273 kHz. This
is to be understood as I0.M1vy = 1.848185 * 100 mm/s = 184.8185 mm/s at 7.0273 kHz.
M
4.3: Naming Simulation Results
By default, the simulation result files are written to a Scene3D directory next to Spectre's psf result folder. The result
file name is the name of the MEMS+ schematic used to create the MEMS+ cell, and it is appended with the type of
result that was run. For example, if the Gyroscope.3dsch file was imported into Cadence Virtuoso for simulation and
a DC Sweep analysis was run on the schematic that uses this model, a Gyroscope.3dsch.dc_sweep file is written to the
Scene3D directory next to the psf folder where Spectre wrote its results.
You can specify a file name to write results using the schematic model’s Properties dialog, which has a parameter
called Scene3DfileBasename (see Figure 4-1 on page U4-6).This parameter is useful for running multiple analyses of
the same type with different settings. You can specify a different result file name so that the previous results are not
overwritten. The default value is “.../Scene3D/SchematicName.3dsch” or if defined, the default value defined in the
Defaults and Options dialog (see “Setting Default Import Options” on page U4-4). Quotes are required. This parame-
ter is able to take a full path or a relative path (relative to the location where the simulator runs). The analysis name is
appended to this name to define the Scene3D result filename. The full path to this file is now available from the sim-
ulator log window. If there are several Innovator device instances on the schematic, the first one that is read imposes
its name. This action checks that you have write permission on the specified location, and if you specify multiple
folders that do not exist in a place where you have write permission, then the software will create the subfolders col-
lection to the result file.
ANALYSISID: each analysis is given an identifier (integer), which is used to replace this keyword. When
placed at the beginning of the Scene3DfileBasename parameter, this keyword can be used to create a new
result folder; when placed at the end of the Scene3DfileBasename parameter, it can be used to create a new
result file; for example:“/home/user/Coventor/MEMS+6.3/RFSwitch/RFSwitch.3dsch.ANALYSISID”. Note
that this identifier is given by Spectre and that a Spectre analysis can generate to 0 to 2 Scene3D result files.
More on that in the example below.
PATHTO3DSCH: will be replaced with the actual full path to the .3dsch file.
BASENAME3DSCH: will be replaced with the base name of the .3dsch file (without the path to it, without
the .3dsch extension).
ROOT/: replaced with system root ('/') when found at the very beginning of Scene3DfileBasename parameter
(see Naming Results and AMS Simulations).
CURRENT/: replaced with current folder ('./') when found at the very beginning of Scene3DfileBasename
parameter (see Naming Results and AMS Simulations).
PARENT/: replaced with parent folder ('../') (see Naming Results and AMS Simulations).
OUTDIR/: replaced with simulator's path to output directory folder when found at the very beginning of
Scene3DfileBasename parameter.
RAW/: replaced with simulators's path to raw folder (Cadence result folder) when found at the very begin-
ning of Scene3DfileBasename parameter.
Note that the OUTDIR/ and RAW/ keyword functions are not part of the public interface of any simulator and
might lead to unexpected results.
Now let's take a sweep analysis as an example. Assuming ADE was used to drive the simulation and the results were
created at their default location, the part of the netlist describing the analyses would look something like this:
[...]
dc1 dc dev=V0 param=dc start=0 end=10 lin=10
sweep sweep dev=V1 param=dc start=0 end=10 lin=10 {
ac ac [...]
}
[...]
The analysis dc1 is given the identifier 1 and produces a single Scene3D result file *.dc_sweep. The analysis sweep
is given the identifier 2 and does not produce any Scene3D result file. The analyses ac are given identifier 3 to 12,
each producing two Scene3D result files: a *.dc and a *.ac.
If you set Scene3DfileBasename to '/RAW/DesignName.ANALYSISID', you would get the following output:
- [Project Directory]
- [Cell Name]
- spectre
+ netlist
- psf
[Collection of cadence result files]
DesignName.1.dc_sweep
DesignName.3.ac
DesignName.3.dc
[...]
DesignName.12.dc
Note that psf is the default relative path to the result folder. Also note that the above example cannot exactly be run
with ADE: the parametric analysis does not produce a netlist that can be saved, does not let you run a single analysis
before sweeping parameters, and does not even use Spectre's sweep analysis, but rather a combination of alter and
analyses. However, this illustrates how identifiers are incremented and how one can associate Scene3D result files
with analyses. This example also assumes that the AC analyses are running their DC point (which can be disabled in
the options of the AC analysis), so each AC analysis in the netlist produces two Scene3D result files: a *.dc and a
*.ac.
M
To use exactly those names with AMS, escape the string with a backslash character before each quote:
\"/home/user/results/device\"
\"./results/device\"
\"../results/device\"
Please note, however, that escaping the quotes will make the parameter incompatible with Spectre. To have the
Scene3DfileBasename parameter accepted by Spectre and AMS, no leading slash or current folder or parent folder
can be used. Above examples can be converted to use keywords instead:
"ROOT/home/user/results/device"
"CURRENT/results/device"
"PARENT/results/device"
Creating MEMS+ result files within Cadence result folder is also an effective way of working around the issue:
"RAW/device"
This button opens a dialog that allows you to select in which library the Advanced Options component symbol will be
created and to specify a name other than the default. Once the component has been imported, it can be used in any
schematic, and it can be used to control the simulation output. Its properties are shown below:
Scene3DfileBasename
This is the same parameter seen in the properties dialog of an imported MEMS+ device, but it takes precedence
over the parameter set in individual symbols. So if you have multiple instances of MEMS+ devices in your sche-
matic and want to change the name/location of the result file, you can change the Scene3DfileBasename parameter
here, and it will be applied to all instances in the schematic. By default it is blank and takes its value from the
master instance (the master instance is the first MEMS+ instance to appear in the netlist, which can be displayed
from the Analog Design Environment window’s Simulation > Netlist > Display menu).
XSampling
Specifies the time sampling used to generate the transient result. Input is a text string, which must be enclosed in
double quotes. It must be a list of sets of three elements { start, end, step }. For instance "{{0,10e-6,1e-6},{10e-
6,100e-6,2e-6}}", which means
when the simulated time is between 0s and 10µs, write a point every 1µs
when the simulated time is between 10µs and 100µs, write a point every 2µs
Spaces are allowed. If a time step is covered by multiple sets, the first one is used. You can omit any of the three
values. In that case, start defaults to beginning of the simulation, end to end of simulation and step to every point.
For times outside specified ranges, all points are written to the result file. So if you set XSampling to "{{10e-
6,20e-6,1e-6}}" and your simulation span from 0 to 30µs, then all simulated points from 0 to 10µs and from 20µs
to 30µs are written, and from 10µs to 20µs, a point is written every 1µs. The step value must be a positive number.
Also, this setting has no effect on DC, DC sweep, and AC simulations.
Point Sampling
Similar to XSampling, except that you specify how many simulation points to skip. The two are exclusive, so if
you specify one, the other must be blank. The input is still a list of sets of three elements { start, end, number of
steps skipped }, which must be enclosed in double quotes. For example "{{,,2}}". The first number indicates the
start of the range, the second number is the end of the range, and the last number indicates the number of steps
skipped. So the example means all over the simulation, write 1 point, skip 2 (meaning that for 3 simulated points,
1 gets written to the result file). The number of steps skipped value must be a positive integer. You can have spaces,
multiple sets, omit values (the number of steps skipped defaults to 0, to write every simulated point). This param-
eter only applies to transient simulations, and the default is to write every point for time ranges not covered by a
particular setting.
GenerateResults
This drop-down menu allows you to choose whether to write Scene3D result files or not. Default is yes. A tran-
sient, pss, or envelop simulation may generate a substantial number of result files, cluttering the simulator output
with messages indicating Scene3D result file creation and occasionally generating errors on result file creation.
M
Setting this value to no will disable Scene3D result file creation. For an example of when this setting might be
appropriate, see page T2-87 of the MEMS+ Tutorials.
The MEMS+ current, forces, and moment names are defined with MEMS+ fully qualified component name, a colon,
and a terminal name. A terminal name can be a component of a MEMS+ mechanical, electrical, or fluidics connector,
an input, or an output. In the figure above, the force in the z direction of the TopComb straight comb stator of the
gyroscope Tutorial model has been output and selected.
With this functionality, note the following:
Please be aware that not all currents / forces / moments under a MEMS+ instance are of interest for the user.
For instance the current flowing through a source holding a translational velocity is a required component of
the system, but of no interest to the user.
The forces and moments displayed are actually the opposite of the expected values. In the example above the
force in z direction of the TopComb element is expected to be positive, but is displayed as negative.
The terminal names displayed are not those of wires or connectors as specified in Spectre's netlist or MEMS+
schematic, but the name of pins as defined on the component in the MEMS+ component library for Cadence.
p_Kxx (where xx is a number) designates a component of a mechanical connector, Exx names an electrical
connector of a MEMS+ component instance. E00 is the first electrical connector, E01 the second, etc...
For mechanical connectors, p_K00 through p_K05 are all the components of the first mechanical connector of
a MEMS+ component instance. p_K06 to p_K11 are the components of the second mechanical connector, and
so on. For a mechanical connector, components are ordered with displacements first, in x (p_K00, p_K06, ...),
y (p_K01, p_K07, ...) and z (p_K02, p_K08, ...) directions. Followed by the components of the rotation vector
on x (p_K03, p_K09, ...), y (p_K04, p_K10, ...) and z (p_K05, p_K11, ...). So SomeDevice:p_K08 designates
the opposite of the force contribution in y direction on the second mechanical connector on the MEMS+ com-
ponent named SomeDevice.
The name of a MEMS+ component is always: I1__ComponentType(1)_InstanceName(1)__...__Component-
Type(n)_InstanceName(n). All the path from the top-level component to a particular instance in the compo-
nent tree is written in that name. For example, in our selected signal above,
I1__RigidPlate_RigidPlate1__StraightCombSegment__TopComb__StraightCombStator_StraightCombStato
r1. StraightCombStator1 is an instance of type StraightCombStator, which is the child of instance TopComb
of type StraightCombSegment, which in turn is a child of instance RigidPlate1 of type RigidPlate under the
top-level of the MEMS+ component tree, as pictured below:
M
4.6: Optimizing Simulations
When using a MEMS+ model in Cadence Virtuoso schematic, you may need to change certain default settings to
optimize results. If a simulation is taking too long, you can also start a simulation with an existing MEMS+ DC anal-
ysis. These settings are explained below.
There must be at least one nonlinear component in the MEMS+ model for the tool to provide output. It can be
a nonlinear plate, a nonlinear suspension, an electrode, or a comb. For best results from the SuggestScaling
tool, it is recommended to switch all mechanical models to the nonlinear type.
The transient simulation has to be relevant for the scaling coefficients reported to mean anything; i.e., the
results have to be correct for the tool to work. If the signal is out of bounds and the simulation is diverging,
the tool cannot help.
2 2
<FC > = 4 ⋅ <FQ >
2 1 2
< x Q > = ----2- ⋅ <FQ >
k
and
2 1 2 1 2 1 2
< x C > = ----------------2- ⋅ <F C > = ----------------2- ⋅ 4 ⋅ <FQ > = --- ⋅ < x Q >
(4 ⋅ k) (4 ⋅ k) 4
From which we get that the mean displacement on the complete device (either fully assembled in MEMS+, or a quar-
ter with multiplicity factor set to 4) is half the mean displacement simulated on a quarter (without multiplicity factor):
2 1
<x C > = < x C > = --- ⋅ <x Q >
2
M
Note that with this release, only one MEMS+ instance can be specified in this dialog.
4. In the Options dialog for the analysis, for the readns parameter, select the DC output file you specified in the
instance names dialog. The location of this readns parameter varies for each analysis type. For example, for a
transient analysis, this setting is on the Algorithm tab of the Transient Options dialog.
5. Run your simulation. Spectre's DC point will be seeded with the DC file rather than starting from zero, effec-
tively accelerating DC state convergence.
Note the following:
The DC file generated with Create initial guess DC file only defines values for signals internal to the
MEMS+ device and is not suited for skipping the DC point.
For best results, use the same DC conditions on exposed connectors in MEMS+ Simulator as on the Virtuoso
schematic.
When several MEMS+ devices are included in a Virtuoso schematic, it is possible to generate a DC file for
each MEMS+ device, and then copy/paste the contents of the separate files into the one used in the Virtuoso
simulation settings.
M
4.7.2: Non-Resonant Structures
For non-resonant structures, especially contact problems, the Accuracy Defaults can be set to either liberal, moderate
or conservative as long as the Integration Method is set to gear2only.
Exposed variables
Geometric parameters
Additional simulation
parameters
Because the parameters are shared for the layout and the simulation model, a number of them are not relevant to the
geometry.
In contrast with standard practices in the EDA industry, each parameter is not checked when it is entered in the Prop-
erties dialog, so you will not get immediate feedback if a parameter would cause the geometry generation to fail. All
of the parameters are verified when the user clicks on OK, and the resulting geometry is generated.
4.8.2: Ports
As of MEMS+ 6.3, pins are not drawn on the layout.
M
The complete error message is reported to the Command Interpreter Window [CIW]:
Notes
Section 5: Troubleshooting
5.1: MEMS+
5.1.1: Replaying .py File Locks Application
Replaying certain parts of a MEMSp.py file can lock the application in an error state. Do not replay sections of a
MEMSp.py file that are marked do not replay in user interface. These sections are meant for replaying without a user
interface.
M
5.1.2: Changes Lost When MEMS+ Loses License
When a license is lost and multiple MEMS+ windows have modifications, the application does not properly prompt
to save the changes from all the windows. If modifications are lost, modifications can be cut and pasted from the
MEMSp.py file (see page U1-13 for more information).
5.2: Innovator
5.2.1: Wizard
If after running the Wizard, the device is not properly constrained, it will report a message similar to the one shown
below:
If this message appears, mostly likely you have not grounded any of your mechanical connectors or enough of your
mechanical connectors. Each device will be different in its requirements; best practices for connecting components
are discussed in detail on page C6-21 of the MEMS+ Component Reference.
Figure 5-1 Model Seems to Be Properly Constrained but Generates Wizard Error
In this case, the individual beams of this suspension were modeled with shell elements:
For this model, shell elements are inappropriate because they should only be used to model structures in which the
vertical dimension (the thickness) is relatively smaller than the other dimensions and where the stress in the thickness
direction is negligible. In this schematic, the beam widths of the suspensions are smaller than their thickness; thus,
shell elements result in a device that is not properly constrained. For this model, Bernoulli beams are more appropri-
ate than shells, so we edit all the beams so that they use the Bernoulli Beam model. The number and location of
mechanical connectors then change, so we have to refix the mechanical connector on the first beam’s End 1 and reex-
pose the mechanical connector on the last beam’s End 2. Rerunning the Wizard then results in a properly constrained
device.
M
Incompatible Material Properties
Another source of possible constraint errors is the material properties of the components. When the Wizard is run on
the device shown below, it generates a constraint error. The mechanical connectors seem to be properly placed and
connected, so we check the material database. For the properties of Silicon, the Shear coefficient is in Pa whereas the
Young's Modulus is in GPa. Usually, they should be of the same order. If we change the Young’s Modulus units to
GPa, update the schematic, and rerun the Wizard, the error message goes away.
Figure 5-3 Mismatch in Material Properties Result in Device that is not Properly Constrained
M
tion to converge. This section provides guidelines on how to adjust the DC settings so that a simulation will generate
results.
DC Analysis
DC Sweep
For more information on DC Sweep analysis, see page R5-10 of the MEMS+ Compact Modeling Reference.
logs created by these analyses will be more complete and may help you to understand the underlying issue.
For Pull-In and Frequency Hysteresis, the initial domain value (lambda or frequency) must be outside a
region of instability.
Reduce the Step Size Scaling Factor (e.g. down to 1.1) to make the stepping more fluent.
Reduce the Step Size\ Minimum Value by an order of magnitude.
Loosen the Corrector tolerances by an order of magnitude.
Reduce the Maximum Number of Instabilities. For Frequency Hysteresis analyses, a large number (>4) of
instabilities is uncommon. If the number of instabilities reported in the GetInfo window is greater than 4,
investigate your model as well as your boundary conditions for unintended system-level conditions.
To troubleshoot a simulation that fails in the vicinity of an instability, which is typically represented by a sharp corner
on a solution plot, try the following:
M
Consider using the Arc Length Corrector.
Try decreasing the Bound On State Vector Length and/or the Bound On Lambda Variation Acceptance Con-
ditions by factors of 10. This will allow to increase the number of points along the solution curve.
For a Pull-In simulation, try increasing contact softening by factors of 10. Contact softening is specified in
Innovator as a property of the root of the Components tree (see page C2-4 of the MEMS+ Component Refer-
ence). Also see Simulations With Contact.
Pull-In, Frequency Hysteresis, and Nonlinear AC analyses are in active development. We are interested in further
improving them based on your feedback. If you are unable to resolve your convergence issue, please contact
Coventor Support.
5.3.4: Nonlinear AC
If a Nonlinear AC analysis has failed, use the convergence log to help diagnose the problem. To access the conver-
gence log, right click on the analysis in Simulator and select Get Info or view the output in the MATLAB Scripting
Command Window.
Reducing the number of harmonics may help a Nonlinear AC analysis converge. Coventor recommends that you start
with a low number of harmonics. If the results are not precise enough, increase the number of harmonics to increase
the precision of lower harmonics. For example, if the symmetry of 0th harmonic is not attained precisely enough for
a symmetric device, it may be improved by increasing the number of harmonics.
If you attempt to calculate a frequency sweep using a Nonlinear AC, and the simulation fails close to a resonance fre-
quency, to use Frequency Hysteresis instead.
For more information on Nonlinear AC analysis, see page R5-39 of the MEMS+ Compact Modeling Reference.
MATLAB transient analysis may give diverging results if a single point contact is reached (for example, the contact
point is the tip of a pie component). This issue can be avoided by fixing unnecessary degrees of freedom.
Daeic3 Errors
When running a transient simulation, a user may occasionally see this daeic error:
Error using MemsplusDocMex
Error using daeic3 (line 230)
Need a better guess y0 for consistent initial conditions.
This error occurs when the Jacobian at t=0 provided by MEMS+ differs significantly from that numerically estimated
by MATLAB. Often this happens when the scaling of system matrices is not good enough. Try the following trouble-
shooting steps:
Temporarily deactivate the position sources if there are any, and check if the simulation with the force
sources succeeds.
If you change a variable in your file, try to make the same change in Innovator, and run the wizard after-
wards. A significant change in a variable value may require the scaling factors to be recalculated.
Run a modal analysis, and make sure you have sufficient damping in your model. Increase the Rayleigh
damping beta value if needed. Typically, you need to reduce the Q factor to a value lower than 103.
From the Innovator tab’s Document Properties dialog, check that Wizard Actions > Auto Update Unit Scale
Factors > Expected Maximum Displacement precisely describes the displacement you expect in your tran-
sient. If this value is set too high, you might run into the daeic3 error.
M
Tighten the position tolerance of the parent DC analysis using both RelativeTolerance and Abso-
luteForceTolerance.
Another daeic error is Daeic3: This DAE appears to be of index greater than 1.This error
occurs because the algorithm tried to determine an initial state because the one provided is not suitable. Try one of the
following:
Provide a suitable initial state (not only the state vector, but also its derivative) using a DC simulation as the
starting point.
Modify (reduce) the targeted time span because the MATLAB algorithm uses the time span to evaluate the
starting point.
5.4.2: Contact
The recommended solver for a contact simulation is the ode15s solver. If a simulation fails to converge with the
ode15s solver and its default settings, try reducing the Maximum order (AdvancedOptions.MaxOrder in MAT-
LAB scripting) to 1.
If simulation results show undesired peaks after contact has occurred, change the Max step size from Auto to a small
size; the value will be problem dependent. Below is an example of how to change this value in MATLAB scripting:
tran.Properties.AdvancedOptions.odesetOptions = odeset('MaxStep', 1e-9)
If the simulation succeeds, check the operating point report and the Scene3D result file. If the point does not seem
appropriate, see Inaccurate or Wrong Operating Point. If Spectre failed to obtain the operating point, see Failing to
Obtain an Operating Point.
M
3. In the case of a large device (this is difficult to give a defined limit, but to give a rough idea: larger than 1
mm), the noise floor on nonlinear mechanics is higher than Spectre's absolute tolerance, and it is not possible
for the solver to find an operating point. In that situation it is necessary to scale position and forces appropri-
ately to obtain the operating point. One solution is to try guessing appropriate values for these. The other
solution is to use the SuggestScaling tool, which is accessed in the MEMS+ model’s Properties dialog, as out-
lined below:
The documentation on SuggestScaling recommends to turn all mechanical elements to nonlinear elements
for best results. In this precise situation, nonlinear mechanics is preventing Spectre from computing the
operating point.
So first change all flexible mechanical elements to the linear model type. If the device uses rigid plates,
change those to the nonlinear model type. You need at least one nonlinear element to actuate the device
during the sample transient simulation. This nonlinear element is essential for SuggestScaling to measure
signals and propose relevant scaling factors. If your schematic is assembled from flexible mechanical ele-
ments exclusively, you need to alter the design to add a nonlinear element (planar/side electrode, comb
electrostatics, pressure load, piezoelectric model, rigid plate).
Import this modified schematic into Virtuoso, and assemble a schematic to drive the MEMS+ device with
a representative excitation. Turn SuggestScaling on and run the sample transient simulation.
The force scaling factor that you obtain in that situation should be much lower than the default (e.g. 1e-8
compared to the default 1e-3). Apply suggested values to your original schematic's unit scale factors
(found in the top-level Components).
Explanation
Let's take a simple, one degree of freedom mass and spring device as an example. We will drive the system with a
force source with the AC magnitude is set to 1. We are interested in the magnitude of the response of the displace-
ment versus frequency. On a SPICE simulator, the system to be solved is always
J ⋅ X = RHS
Where J is the system matrix, X the vector of node potentials to be solved, and RHS the current flowing through the
same nodes.
For our example of a mass suspended by a spring, under an AC analysis,
J is a 3x3 complex matrix, which will be detailed later.
X, the solution vector, is defined as [ tpz, tvz, flow_through_tvz ]. tpz is the position of the mass, tvz is its
velocity, and flow_through_tvz is the flow through the source holding tvz.
RHS is the excitation vector, and because we're only exciting the Z force with an AC magnitude of 1, it is [ 1,
0 ,0 ].
The contribution of the spring to J is
ForceSF K
----------------------------- 0 0
PositionSF
0 0 0
0 0 0
where ForceSF is our force to current scale factor, PositionSF is our position to voltage scale factor, and K is the stiff-
ness of the spring.
The contribution of the mass to the force flowing through mirrorcenter_tpz is ForceSF*M*d_by_dt(tvz/VelocitySF).
Using the complex analogy for the frequency domain, the operator d_by_dt is equivalent to i*2* π *freq. The contri-
bution of the mass is then
2ForceSFfreq i M π
0 ------------------------------------------------ 0
VelocitySF
0 0 0
0 0 0
where M is the mass of the rigid plate and the four beams, VelocitySF is our velocity scale factor, and freq is the fre-
quency of excitation.
The last contribution is the one from the source computing mirrorcenter_tvz from mirrorcenter_tpz:
0 0 0
0 0 1
2freq iπVelocitySF
– ------------------------------------------------- 1 0
PositionSF
Now to plot the magnitude of mirrorcenter_tpz against the frequency, we just have to solve the system for X and com-
pute the magnitude of the first component, which is:
PositionSF
Abs -------------------------------------------------------------------
2 2
ForceSF ( K – 4 freq Mπ )
0 gmin 0
0 0 0
0 0 0
Assuming a non-zero value for gmin, the magnitude of tpz against frequency takes the following form:
PositionSF
Abs ---------------------------------------------------------------------------------------------------------------------------------------------
2 2
( ForceSF ( K – 4freq Mπ ) +2i freqgminπVelocitySF )
Here gmin introduces additional damping and hence will shift the frequency peak. How much depends on the relative
size of gmin.
M
Note that each component drives gmin's contribution to the system matrix. Thus, a different set of components will
generate a different contribution to the system matrix and yield different effects on the frequency response.
In general, it is advised to set gmin to 0, unless you can achieve convergence by any other means.
In cases where you need to set gmin to a non-zero value, measure its effect on your device using frequency analysis.
5.6: Scene3D
5.6.1: New Result File Will Not Load Automatically
When a simulation result file is overwritten, Scene3D will not automatically reload the newer result file. If a result
file is overwritten, use the Reload icon in the Scene3D tab to view the newest results.
Section 6: Appendix
M
MEMS+ application
Save Ctrl + S
Ctrl + Y (Windows)
Redo U1-11
Ctrl + Shift + Z (Linux)
Copy Ctrl + C
Cut Ctrl + X
Paste Ctrl + V
Delete Delete
Rename F2
Variable Tree
Comment Editor (Material Database and Process Editor. Note that this is opened using Alt + C)
Innovator
Fit to Window Ctrl + 0 R4-32
M
Toggle Watermark Ctrl + Alt + W
Properties Alt + P
Expose Ctrl + E
Unexpose Ctrl + H
Simulator
M
Scene3D
Show Alt + S
Hide Alt + H
6.2.1: ExportSch
This command allows the user to export MEMS+ files in different formats or to export a list of variables for use in
other software programs. The command and all its operations and variables are listed below. Note that the arguments
in square brackets are optional.
ExportSch filename.3dsch [operation(s)]
The operations are
-h --help Prints this message.
*.3dsch --sch [file.3dsch] [search=true/false] [library=name] [cell=name]
[check=true/false] Reads the Innovator specified by [file.3dsch].
[search=true/false] Can be used to search for the schematic along the path MEMSPLUS_SCHE-
MATIC_PATH.
[library=name] Limit the search to the specified library.
[cell=name] Limits the search to the specified cell.
[check=true/false] If set to true, the command will not load the schematic, but will verify it can be
found and print out full path to schematic.
-v name=value Assigns a variable to a value. The name must match a valid exposed variable.
--varlist [file] [format="name=value"] Returns the list of exposed variables; requires a MEMS+
schematic (filename.3dsch) to be available. Return to the standard output if [file] is omitted. [for-
mat="name=value"]specifies the output format. The name and value keywords must appear. Defaults to
“name=value”.
--sat [file] Exports the schematic in 3-D SAT R26 format to the specified file; requires a schematic file
(filename.3dsch) to be available. [file] defaults to filename.sat if omitted.
--2dsat [file] Exports the schematic in 2-D SAT format to the specified file; requires a schematic file (file-
name.3dsch) to be available. [file] defaults to filename.2dsat if omitted.
--gds [file] Exports the schematic in GDS format to the specified file; requires a schematic file (file-
name.3dsch) to be available. [file] defaults to filename.gds if omitted.
--pcell [file] Exports the schematic as a Cadence Virtuoso PCell to the specified file; requires a schematic
file (filename.3dsch) to be available. [file] defaults to filename.pts if omitted.
--pcellcreation [file] Exports a skill script defining the P-cell to the specified file; requires a schematic
file (filename.3dsch) to be available. [file] defaults to filename.mpef_p if omitted.
--cadencelibrarycell [file] Exports a definition file for creating a new cell in Cadence Virtuoso li-
braries to the specified file; requires a schematic file (filename.3dsch) to be available. [file] defaults to file-
name.mpef_c if omitted.
--spectrenetlist [file] Exports a Spectre netlist to the specified file; requires a schematic file (file-
name.3dsch) to be available. [file] defaults to filename.scs if omitted. Other arguments include
[unitTest_time=time] Sets time limit for the simulation to run.
[resultFilename=name] Forces name of MEMS+ result file to be name.
[resultBasename=name] Changes the name of MEMS+ result file, keeping consistent extension.
[hasResultBasenameParameter=bool] Defines Scene3DfileBasename to be a parameter of the
subckt. Can be true or false; defaults to true.
[hasSuggestScalingParameter=bool] Defines SuggestScaling to be a parameter of the subckt.
Can be true or false; defaults to true.
M
omitted.
--update [file] [copy=all] Updates and saves the schematic; requires a schematic file (file-
name.3dsch) to be available.[file]specifies the output file; it defaults to filename.3dsch if omitted. [co-
py=all]creates a copy of all dependent files next to the new schematic file name. Other arguments include
[mmdb=filename] Renames the Material Database file used by the schematic.
[proc=filename] Renames the process file used by the schematic.
[mlib=filename] Renames the Component Library file used by the schematic.
[alllocal=bool] Strips down absolute paths of all dependent documents. Defaults to false.
--log [file] [cerr=file] [cout=file] Redirects outputs to files. [file] specifies where stan-
dard error and output are both redirected. [cerr=file]specifies where standard error is redirected.
[cout=file]specifies where standard output is redirected.
--loadmodelstate file path=PathToSch stop=id skip=id Loads the state of a model from
the file and runs model. Takes care of opening the appropriate schematic that must be available from MEMS+
search path. All arguments must be provided at once; see example.
file Input file, as generated by model library.
path=PathToSch Path to be added to search path
stop=id Stop before loading state #id
skip=id Skip loading state #id
result=filename Writes out the DC Scene3D result file of the failing point to 'filename.index.dc'
*.msim --msim [file.msim] Reads the Simulator document specified by [file.msim] and executes
the simulations therein.
*.mlib Reads a component library file.
*.mmdb --mmdb [file.mmdb] [file.mpd] Reads the material database file specified by
[file.mmdb]. If [file.mpd] is specified, it exports the mmdb file to CoventorWare mpd format.
--stop Pauses the execution after reading arguments for attaching debugger.
Examples
To export a schematic to a SAT file in temporary folder with variable specifications:
ExportSch /home/user/MEMS+/RFSwitch.3dsch --sat /tmp/MEMSplus/RFSwitch.sat
-v T=273.1 -v ActuationPadWidth=200
To export an exposed variable list to a file with values separated from names by tab, one variable per line:
ExportSch RFSwitch.3dsch --varlist /tmp/varlist.file --varlist
format="name\tvalue\n"
To provide an operation with several arguments with a comma separated list of arguments:
ExportSch --loadmodelstate memsplus.err, path=/my/first/path,path=/my/sec-
ond/path
To modify values of exposed variables var1 and var2, and then run all simulations in file.msim:
ExportSch file.msim -v var1=2 -v var2=4