Go to www.awrcorp.com
Back to search page Click to download printable version of this guide.

A.6. Creating XML Libraries

To populate the Libraries node within the NI AWR Design Environment suite, you create XML files that adhere to AWR's schema described in “AWR's XML Schema Description”, and then link them into the application.

While understanding all of XML can be complicated, creating your own XML component libraries is quite simple. When creating XML component library files, you may find the following information helpful:

A.6.1. Creating XML Libraries using XML Files

To create a new XML library:

  1. Create a new .xml file, or make a copy of one of the files provided in the \AWR20xx\Library directory.

  2. To define the library, see the allowed keywords and their required hierarchy described in “AWR's XML Schema Description”. In addition, see the required syntax shown in “Sample XML File Defining Resistors” and in the .xml files in the \AWR20xx\Library directory.

  3. Begin with the XML_COMPONENT_DATA top-level keyword. Under this keyword, create one or more FOLDER keywords to contain component models.

  4. Under the FOLDER keyword, create one or more COMPONENT keywords to define the actual component models.

  5. Under the COMPONENT keyword, create one or more DATA keywords to define the actual component data. The DataType attribute of the DATA keyword specifies the type of component being defined, such as S-parameter data (sparameter), AWR built-in component model (awrmodel), or Touchstone netlist (tnetlist). When defining component data, note the following:

    • When using DataType=awrmodel, you must define each parameter in the component model via the PARAM keyword. Note that parameter values are specified in MKS; you can use scaling suffixes such as pF to scale values appropriately.

    • When using DataType=sparameter, you must provide a reference to a standard Touchstone file that contains the data; this file can be local or specified as a URL.

  6. Reference the created XML in the NI AWR Design Environment suite. See “Using the AppDataUser Folders” for more information.

  7. In the NI AWR Design Environment suite, click the Elements tab to display the Elements Browser. The new library is visible as a subnode of the Libraries node. Expand the library to view the folders that you defined in your XML library. Expand the folders to see the library's components.

A common requirement is to set a data file's NET parameter to 'read only' as shown in the following example.

	<DATA DataType="sparameter">
		sparam/r10.s2p
		<PARAM Name="NET" ReadOnly="yes"></PARAM>
	</DATA>

Another common scenario is to use an S-parameter file in the VSS libraries as shown in the following example.

	<COMPONENT Name="LP0603A0902AL">
	<MODEL>LIN_S</MODEL>
	<DESC>0603 Thin Film LPF</DESC>
	<PARTNUMBER>LP0603A0902AL</PARTNUMBER>
	<SYMBOL></SYMBOL>
	<HELP>http://www.avxcorp.com/docs/catalogs/lp0603.pdf</HELP>
	<CELL></CELL>
	<DATA DataType="awrmodel" Inline="yes">
		<PARAM Name="NET">
			LP0603A0902AL
		</PARAM>
	</DATA>
	<SUBFILE DataType="sparameter">
			LPF/LP0603A0902AL.S2P
	</SUBFILE>
	</COMPONENT>	

A.6.1.1. Sample XML File Defining Resistors

The following is a simple XML file that defines a resistor using various model types.

	<?xml version="1.0"?>
<!-- Schema definition; always use this exact line-->
	<XML_COMPONENT_DATA xmlns="urn:awr-lib-data">
	<COPYRIGHT>This library is a copyright of AWR</COPYRIGHT>
	<SUMMARY>This library contains AWR Example Library models </SUMMARY>
<!-- Define folder for components-->
	<FOLDER Name ="Resistors" Icon ="Resistor">
<!-- Begin component definition-->
		<COMPONENT Name="awr model" >
			<MODEL>REST</MODEL>
			<DESC>10 ohm resist 0.5 percent normal variation</DESC>
			<PARTNUMBER>r1</PARTNUMBER>
			<SYMBOL>Resistor@system.syf</SYMBOL>
			<HELP>HelpEX2/HelpRXAWR1.pdf</HELP>
			<CELL>r10artwork@RcellsGDS.gds</CELL>
			<!-- Example of defining an AWR built-in component model.  
Define each parameter via the PARAM keyword-->
			<DATA DataType="awrmodel" Inline="yes">
				<PARAM Name="R" ReadOnly="yes">
					10
					<TOLP>0.5</TOLP>
					<DIST> uniform </DIST>
				</PARAM>
				<PARAM Name="T" ReadOnly="yes">
					25
				</PARAM>
			</DATA>
		</COMPONENT>
<!-- Start component definition-->
		<COMPONENT Name="awr schematic">
			<MODEL>SUBCKT</MODEL>
			<DESC>R1 Schematic</DESC>
			<PARTNUMBER>r1sc</PARTNUMBER>
			<SYMBOL>Resistor@system.syf</SYMBOL>
			<HELP>HelpEX2/HelpRXschem1.pdf</HELP>
			<CELL>r10artwork@RcellsGDS.gds</CELL>
			<!-- Example of defining a model via an AWR schematic. 
The schematic is stored relative to this xml file in schem/r10.sch-->
			<DATA DataType="awrschematic">
				schem/r10.sch
			</DATA>
		</COMPONENT>
<!-- Start component definition-->
		<COMPONENT Name="spice netlist">
			<MODEL></MODEL>
			<DESC>r1 spice</DESC>
			<PARTNUMBER>r1sp</PARTNUMBER>
			<SYMBOL>Resistor@system.syf</SYMBOL>
			<HELP>HelpEX2/HelpRXSPICE1.pdf</HELP>
			<CELL>r10artwork@RcellsGDS.gds</CELL>
<!-- Example of defining a model via a PSpice netlist. 
The netlist is stored relative to this xml file in spice/r10.cir-->
			<DATA DataType="pspicemodel">
				spice/r10.cir
			</DATA>
		</COMPONENT>
<!-- Start component definition-->
		<COMPONENT Name="sparameter file">
			<MODEL>SUBCKT</MODEL>
			<DESC>R1 Sparameters</DESC>
			<PARTNUMBER>r1sp</PARTNUMBER>
			<SYMBOL>Resistor@system.syf</SYMBOL>
			<HELP>HelpEX2/HelpRXSparam1.pdf</HELP>
			<CELL>r10artwork@RcellsGDS.gds</CELL>
<!-- Example of defining a model via s-parameter data. 
The s-parameter data is stored relative to this xml file in sparam/r10.s2p
This component is setting the s-parameter name to be read only.->
			<DATA DataType="sparameter">
				sparam/r10.s2p
				<PARAM Name="NET" ReadOnly="yes"></PARAM>
			</DATA>
		</COMPONENT>
	</FOLDER>
			

A.6.2. Creating XML Libraries Using Excel Files and Visual Basic

The following sections describe the format needed in a Microsoft Excel file to generate a structurally-correct XML file using the Visual Basic script that NI AWR provides. The details of the library are explained and the spreadsheet is demonstrated using an example. The Excel file and script are found at: XML_Library_Generation.zip.

A.6.2.1. Microwave Office Example Library Overview

The Microwave Office example library is a very basic library implemented in four different ways. Figure A.1, “Circuit Element Tree for the AWR Resistors Library” shows the library structure. The library is just three resistors with values of 10, 20, and 30 ohms. The parts from each individual folder display in the lower window of the Elements Browser.

Figure A.1. Circuit Element Tree for the AWR Resistors Library

Circuit Element Tree for the AWR Resistors Library

The Resistors Library is implemented using the AWR resistor model as an AWR schematic file, as an S-parameter file, and as a SPICE netlist. All are equivalent models stored in different formats. The first version uses the AWR resistor model and assigns the proper component attributes to it (for example, resistance value, layout, and Help topic). The other three versions are external text files that are loaded into the NI AWR Design Environment software with appropriate component attributes assigned to them such as layout and Help topic.

To see the library:

  1. Place the contents of the AWR_Resistors_Lib folder into the xml/Circuit Elements folder (choose Help > Show Files/Directories > XmlUser ).

  2. Open a new project to see the AWR Resistor Library library under the Libraries node under Circuit Elements.

A.6.2.2. VSS Example Library Overview

This VSS example library is a simple Additive White Gaussian Noise Channel (AWGN) implemented in two different ways, and includes resistors to show how to add S-parameter files as a VSS model. Figure A.2, “System Block Element Tree for the AWR VSS Example” shows the library structure. In the two different AWGN examples, each include three elements with 0, 5, and 10 watts power, and 10, 20, and 30 ohm resistors.

Figure A.2. System Block Element Tree for the AWR VSS Example

System Block Element Tree for the AWR VSS Example

The AWGN library was created using the AWGNAWR model and AWR system diagram file. All are equivalent models stored in different formats. The first version uses the AWR AWGN model and assigns the correct component properties to it such as power, powertype and insertion loss. The second one uses an AWR system diagram, where external files are loaded into the NI AWR Design Environment software.

The resistors library is composed of S-parameter files that were created using "awrmodel" as the model type and NI AWR's LIN_S model as discussed in the following sections.

To view the library:

  1. Place the contents of the AWR_VSS_example folder into the xml/System Blocks folder (choose Help > Show Files/Directories > XmlUser ).

  2. Open a new project to see the AWR VSS Example folder under the Libraries node under System Blocks.

A.6.2.3. Generating the XML Library Using a Visual Basic Script

The previous steps describe how to load example XML libraries into the NI AWR Design Environment software. Also included with this exercise are the Excel spreadsheets used to generate this library: (AWR_Resistors.xls in the AWR_Resistor_Lib folder and AWR_VSS_example.xls in the AWR_VSS_example folder). This file is explained in detail.

Finally, there is an NI AWR Design Environment project file named Excel_2_XML.emp. Loaded in this file is a Visual Basic script named generate_XML_MWO. When this script runs it asks for an Excel spreadsheet file, processes all of the information in the Excel file, and generates an XML file. The resulting XML file has the same name as the Excel spreadsheet except it has an .xml extension. You can run the script on the AWR_Resistors.xls file to observe the result.

See “The Script Development Environment” for information on the scripting environment.

A.6.2.4. Excel Spreadsheet Format

Figure A.3, “Blank Excel File for XML Library Generation” shows a generic Excel worksheet with no information set. The column headers help arrange the information.

Figure A.3. Blank Excel File for XML Library Generation

Blank Excel File for XML Library Generation

There are two major sections to the spreadsheet. Cells A2 through F2 contain specific information for the folder of library parts represented by this worksheet in the Excel file (multiple worksheets are allowed in one Excel file). All of the parts set in an Excel file are made into one XML file, even if there are multiple worksheets. Figure A.4, “Excel File for the Resistors XML Library, Showing Multiple Worksheets” shows a section starting at Row 4 which contains the specific library parts, one part per line.

Figure A.4. Excel File for the Resistors XML Library, Showing Multiple Worksheets

Excel File for the Resistors XML Library, Showing Multiple Worksheets

Excel Cell A2 - Folder

The text in cell A2 is the name of the folder used for the data for that specific worksheet. These folder names are subfolders to any folder name given in a higher-level XML file that references this file. For example, in the top level XML file for this example, there is one line in the file that calls the AWR_Resistors.xml file as follows:

<FILE Name="AWR Resistors Library" Icon="Resistor">
AWR_Resistors_Lib\AWR_Resistors.xml</FILE>

The first section of this line sets the top level folder name, in this case "AWR Resistors Library". Verify in Figure A.1, “Circuit Element Tree for the AWR Resistors Library” that this is the name of the top level folder for this library. Note that the folder name listed in cell A2 is the name of the subsequent folder name. For example, Figure A.4, “Excel File for the Resistors XML Library, Showing Multiple Worksheets” shows the Excel worksheet for the AWR Model portion of the library. The folder name in cell A2 reads "AWR model" which is the name of the first subfolder for this library.

You can set different levels of folder names by using the "/" character between folder names. For example, if you replace "AWR model" in cell A2 of the spreadsheet shown in Figure A.4, “Excel File for the Resistors XML Library, Showing Multiple Worksheets”, with level/test/AWR model, the XML tree displays as in Figure A.5, “Example Library with Additional Folder Levels”.

Figure A.5. Example Library with Additional Folder Levels

Example Library with Additional Folder Levels

The folder path in cell A2 does not have to be a unique path. You can specify the same folder name for two different Excel worksheets. In this case, all of the parts from both worksheets are placed in the same folder. You can also leave the folder path blank to indicate that all of the parts are located under the top level folder name.

Excel Cell B2 - XML Model Type

The text in cell B2 specifies which XML model type is used for this worksheet. This text must match one of the allowable XML model types. The complete list of available model types is listed in the libschema.xml file, which describes the XML format. Some common file types include:

  • sparameter - an N port S-parameter file

  • awrnetlist - an AWR netlist file

  • awrmodel - a model internal to the NI AWR Design Environment suite

  • pspicemodel - a SPICE-like netlist for translation into AWR netlist format

  • mdif - an MDIF file

  • awrschematic - a schematic file that represents an AWR schematic

  • emstructure - an EM Structure file that represents an AWR EM structure

All of these types reference external files except for awrmodel. When the awrmodel XML model is used, you must specify in column B (the Model column) of the data section which model is used.

For VSS libraries, you only use the awrmodel and awrschematic types.

Excel Cell C2 - Parameter Name

This cell is used when making parameterized xml, and it must be set for each folder that is being parameterized. This text is shown for each parameterized block as the parameter name on the schematic and in the Element Options dialog box. See “Parameterized XML” for more information.

Excel Cell D2 - Parameter Listing Column

This cell is used when making parameterized xml. You specify the column from which you use the text to describe parameterization. See “Parameterized XML” for more information.

Excel Cell E2 - Top Parameter

This cell is used when making parameterized xml. If you are parameterizing through hierarchies, this cell is used. See “Parameterized XML” for more information.

Excel Cell F2 - Icon

The text in this cell specifies which icon you want for the folder path specified in cell A2. Leaving this blank sets the default icon for the folder. To demonstrate, the example library was changed to use different icons as shown in Figure A.6, “Example Library Using Different Icons”. This isn't practical and is for demonstration purposes only.

Figure A.6. Example Library Using Different Icons

Example Library Using Different Icons

The icon name must come from a list of pre-defined icon names included in the following section.

Common XML Icons

The following list includes many of the common Microwave Office icons:

Baluns, Bends, BJT, Capacitor, Coaxial, Coplanar, Coupled Inductor, Coupled Lines, Diode, FET, Filters: Bandpass/Bandstop/Highpass/Lowpass, Inductor, Lines, Lumped Element, Phase, Ports, PwrDivider, Resistor, Resonators, Signal, Substrates, Transformer, Transmission Lines, Waveguide.

The following list includes many of the common VSS icons:

Adders, Amplifiers, Analog-Digital, Bandpass, Bandstop, Behavioral, BER, Binary, BPSK, Channel Encoding, Channels, Coding/Mapping, Constants, Converters, Data Files, Data Type, dB, Decoders, Demodulators, De-multiplexers, Encoders, File Based, Files, Filters, FSK, General Receiver, General Receivers, GMSK, Highpass, Interleaving, Legacy, Logic, Lowpass, Mag/Phase, Math Functions, Math Tools, Meters, Modulated, Signals, Modulation, Modulators, MPSK, MSK, Multiplexers, Multiplexing, Multipliers, Network Analyzers, Noise, OQPSK, PAM, Pi/4 QPSK, Ports, Primitives, Pulse, QAM, QPSK, Random, Receivers, RF Blocks, Serial-Parallel, Signal Processing, Signal Processors, Simulation Based, Source Encoding, Sources, Tracking/Feedback, Transcendental, Transmitters, Waveforms.

Custom icons are currently not supported in the library.

For a full list of the available icons, see “All Available XML Icons”.

A.6.2.5. Data Section of the Spreadsheet

The following sections provide information about entering individual models for each particular library, starting on row 4 of the spreadsheet. One model per line is added to the library. As shown in Figure A.7, “Microwave Office Example Library Worksheet Showing Columns A, B, and C” you must specify an "End" tag in column A after the last entry. The script terminates if it cannot find this tag. The following sections describe the contents of each column in the data section of the spreadsheet.

Excel Column A - Component Information

This is the model component section of the library part. The text in this column is the first-level description for the part. When you select a library folder from the XML folder list, the information in column A displays in the lower window of the Elements Browser for each part. For example, Figure A.8, “Example Showing Where Data in Column A Displays in the Library” shows the information in column A for the AWR Model folder of the AWR Resistors Library. Note the text entered in column A. Figure A.8, “Example Showing Where Data in Column A Displays in the Library” shows the elements available in the AWR Model folder of the library. Note that the text displayed for each model matches the text in Column A of the spreadsheet. Verify that the other models match with the library in the example project and example spreadsheet provided.

Figure A.7. Microwave Office Example Library Worksheet Showing Columns A, B, and C

Microwave Office Example Library Worksheet Showing Columns A, B, and C

Figure A.8. Example Showing Where Data in Column A Displays in the Library

Example Showing Where Data in Column A Displays in the Library

There are different ways to view the parts in a folder (for example, as large icons or small icons). To see the view options, right-click in the lower window of the Elements Browser. Figure A.8, “Example Showing Where Data in Column A Displays in the Library” shows the large icon view.

Excel Column B - Model Name

This column specifies the model in the NI AWR Design Environment suite to use for the library part. The entries in this column are only necessary if the awrmodel format is specified in cell B2 or if you are making parameterized XML/subcircuit. For all other formats, leave this column blank. These names must match model names in the NI AWR Design Environment suite. In Figure A.7, “Microwave Office Example Library Worksheet Showing Columns A, B, and C” column B shows that the REST (resistance with temperature) model is used for these library parts. In Figure A.9, “Element Options Dialog Box for REST Model”, one of these library parts is placed in a schematic and the Element Options dialog box is open.

Figure A.9. Element Options Dialog Box for REST Model

Element Options Dialog Box for REST Model

The model name to use in the Excel file is found on the title bar of the dialog box. It is the capitalized name after the "Element Options:" text.

Excel Column C - Model Description

The text in column C is a more detailed description for each part. When you choose a library from the XML folder list, this information displays in the lower window of the Elements Browser when the view is set to Show Details. For example, Figure A.7, “Microwave Office Example Library Worksheet Showing Columns A, B, and C” shows the information in column C for the AWR Model version of the resistor library. Figure A.10, “Example of Column C Description Display when Details are Shown” shows the elements available in the AWR Model folder of the library with their descriptions displayed. The description for each model matches the text in Column C of the spreadsheet. Verify the other models match with the library in the NI AWR Design Environment suite and example spreadsheet provided.

Figure A.10. Example of Column C Description Display when Details are Shown

Example of Column C Description Display when Details are Shown

Excel Column D - Model Part Number

The text in column D is the part number for each model. Each element in a schematic or system diagram (for example a model, S-parameter file, netlist, or EM structure) has a setting for a part number which is useful for a Bill of Materials (BOM) generation for a design or any other user-defined purpose. The Element Options dialog box in Figure A.9, “Element Options Dialog Box for REST Model” shows the Part Number at the bottom middle. Figure A.11, “Example Library Worksheet Displaying Columns D, E, and F” shows column D for the part number. Note that the part number specified in Figure A.9, “Element Options Dialog Box for REST Model” matches the text in cell D4 of the example spreadsheet.

Figure A.11. Example Library Worksheet Displaying Columns D, E, and F

Example Library Worksheet Displaying Columns D, E, and F

Excel Column E - Symbol Setting

In the NI AWR Design Environment suite, you can assign any symbol to any model, including external files such as S-parameter files and netlists. Outside of XML, this assignment is made in the Element Options dialog box on the Symbol tab, as shown in Figure A.12, “Element Options Dialog Box Showing Symbol Selection”.

Figure A.12. Element Options Dialog Box Showing Symbol Selection

Element Options Dialog Box Showing Symbol Selection

You can use any symbol from the XML library. Every model has a default setting, so this column can be blank. The only requirement is that the number of pins on the symbol must match the number of nodes in the model. It is not possible to assign a 3-pin FET symbol to a resistor model. The best way to determine what to specify in column D is to look at the Element Options dialog box Symbol tab, find the symbol you want, and then copy the name of the symbol. This setting is most commonly used to assign a more meaningful symbol to parts that are external files.

The NI AWR Design Environment suite also allows you to create custom symbols (choose Project > Circuit Symbols > Add Symbol). You must manually include a custom symbol file in the $AWR/symbols directory. Web-based XML libraries cannot currently download custom symbol files.

Excel Column F - Help Setting

XML libraries can call Help specific to the element library. The Element Options dialog box contains an Element Help button and a Vendor Help button. Click Element Help to open the NI AWR Help topic for the model from which you opened the dialog box (for example, the REST model in Figure A.12, “Element Options Dialog Box Showing Symbol Selection”). Click Vendor Help to open the Help location the vendor specifies, either an HTML URL or an absolute or relative file path. An absolute path contains the entire path to the file, while a relative path to the location of the XML file being read is defined in relation to the current directory.

In the example library, the Help files are Microsoft Word documents located in the \HelpEX2 folder for the Microwave Office example and the \Help folder for the VSS example. In Figure A.11, “Example Library Worksheet Displaying Columns D, E, and F”, the settings in column F are relative paths to the Help files for these parts.

An HTML URL is a more flexible option since website information is easily updated. Web-based Help files can be changed instantly if necessary, and require no changes by library users. Local files require each user to make changes if a Help file changes.

Excel Column G - Layout Cell

Libraries should include layout cells for their parts so Microwave Office library users have the correct layout cell for each part.

Without XML, you select layout cells on the Layout tab of the Element Options dialog box, as shown in Figure A.13, “Element Options Dialog Box Showing the Layout Setting”. You can assign layout cells that are imported to the Artwork Cell Editor.

Figure A.13. Element Options Dialog Box Showing the Layout Setting

Element Options Dialog Box Showing the Layout Setting

The syntax for this cell entry is <cellname>@<gdsfilename>. When an XML library part is placed in a schematic, if there is a layout cell specified for that part, the NI AWR Design Environment software loads the <gdsfilename> GDSII file into the Artwork Cell Editor if it is not already loaded. The GDSII file must be located in the same folder as the XML file that contains this part. The artwork cell specified in <cellname> is assigned as the layout cell for the part.

Figure A.13, “Element Options Dialog Box Showing the Layout Setting” shows the GDSII file used in the example library loaded into AWR's Artwork Cell Editor.

Figure A.14. Layout Manager View with the Example GDSII File Loaded

Layout Manager View with the Example GDSII File Loaded

Notice that under Cell Libraries the GDSII library name displays next to the GDS node icon. Next to the library name is the full path to the loaded GDSII file (truncated in this view). Note that the library name Rcells is different than the GDSII file name RcellsGDS.gds. A list of all cells in the library displays under the library name.

Figure A.15, “Microwave Office Example Library Worksheet Showing Columns G, H, and I” shows how the layout cells are set by listing the cell name and the GDSII file name in the Excel file for this example. Note that the GDSII library name is not used in this syntax.

In the Microwave Office program, a schematic model and a layout cell are associated via cell ports. Cell ports are drawing objects in a layout cell that tell the system how to connect the layout cell to other drawing objects. The cell ports also have numbers which correspond to the node numbers of the schematic element. Although not necessary, it is a good idea to create your GDSII cells so that the number of cell ports matches the number of nodes in the model. If a GDSII file for the library package is not available, you can create it in the Microwave Office program using the Artwork Cell Editor (see Microwave Office Layout Guide for more information). NI AWR provides artwork cells for some standard packages to help you get started. These are located in the $AWR/Examples folder for version 9.0X.

Figure A.15. Microwave Office Example Library Worksheet Showing Columns G, H, and I

Microwave Office Example Library Worksheet Showing Columns G, H, and I

Excel Column H - Column ZZ - Model Information

Model parameter (or file) information is specified starting in column H. Two groups of model types determine the entries in column H; one group is awrmodel and parameterized subcircuit and the other group consists of all other model types. For all other (non-awrmodel) models, the only model specification is a full or relative path to a data file (for example, a schematic, netlist, or S-parameter) to import into the NI AWR Design Environment suite, only in column H. Note that S-parameters used in the VSS program are a special case that is discussed below.

AWR Model Specification

For the awrmodel type, one column is used for each model parameter that is set to a value other than default. This might be only one column for a simple model such as a resistor, or over 100 columns for models such as the BSIM FET model.

For the awrmodel specification, one column is used for each model parameter. The model parameter name is specified in the header column (row 3) and the value is specified in the proper row for that part. The parameter name must match the model parameter name in the NI AWR Design Environment suite exactly. You can use every column starting with column H, without skipping columns. The script to generate the XML looks at row 3 until it finds a cell that is empty; this is how it determines how many parameters there are.

In the example library for the awrmodel resistors, the temperature resistor model parameters are shown in Figure A.9, “Element Options Dialog Box for REST Model” for one of these parts. Notice that this model has R and T parameters. In the Excel spreadsheet for the awrmodel resistors shown in Figure A.15, “Microwave Office Example Library Worksheet Showing Columns G, H, and I”, these model parameters are listed in row 3 of the spreadsheet, and then the assigned values for each model are listed in that parameters column.

NOTE: If you add an asterisk character (*) to the right of the parameter name (R*), the parameter values under that column cannot be modified in the NI AWR Design Environment suite. This option is useful when you want to make sure some parameter values of your model remain unchanged.

When entering model parameters, enter the values in base units. For example, enter capacitance in farads, inductance in henries, and current in amps. When a library part is used, these values are converted to the units set in the project.

Notice that there is additional information in the R parameter column. Model parts often have statistical variation to use for yield analysis (also called Monte Carlo analysis). A special syntax for each parameter setting allows statistics to be set for the XML part. To define a parameter for statistical variation, use the following syntax:

 <NV> s( <SV><VT>,<ST>)

where <NV> is the nominal value for the parameter in base units, <SV> is the statistical variation either in absolute number in base units or percent, <VT> specifies the variation type: p for percent or a for absolute, and <ST> specifies the statistic type: u for uniform, n for normal, ln for log normal, nc for normal clipped, or nt for normal tolerance.

In Figure A.15, “Microwave Office Example Library Worksheet Showing Columns G, H, and I”, the first resistor in the library's awrmodel folder has a setting of 10 s(0.5p,u). The nominal value is 10 ohms, and the statistics are 0.5 percent with a uniform distribution. Figure A.9, “Element Options Dialog Box for REST Model” shows the nominal value of R set to 10 ohms. Figure A.16, “Element Options Dialog Box Showing Statistical Settings” shows the statistical settings for this part that display when you click the Yield button on the Parameters tab toolbar, matching what is in the spreadsheet.

For no statistics, just enter the nominal value as shown for the T parameter in Figure A.15, “Microwave Office Example Library Worksheet Showing Columns G, H, and I”

Figure A.16. Element Options Dialog Box Showing Statistical Settings

Element Options Dialog Box Showing Statistical Settings

AWR Model for VSS LIN_S Model for VSS

There is one special case for VSS libraries. When you want to use an S-parameter file as the model in a VSS simulation, you need to create a library of the awrmodel type using LIN_S as the model, and then specify the path to the S-parameter being used. In this case, the library must load this S-parameter data file also. The script to convert the Excel file to XML can accomplish this. Figure A.17, “Example Library for VSS Using S-parameter Files” shows the Excel data for the VSS library in the example that uses S-parameters as the model.

Figure A.17. Example Library for VSS Using S-parameter Files

Example Library for VSS Using S-parameter Files

AWR Model for VSS LIN_S Model for Microwave Office

Figure A.18, “Microwave Office Example Showing Columns F, G, and H for the S-parameters” shows the Excel library for the S-parameter representation of the AWR Resistors Library for the Microwave Office program. In this library, the S-parameter data is in a subfolder named sparam. The column header in cell H3 is DATA. For non-awrmodel parts this header can be named anything.

Figure A.18. Microwave Office Example Showing Columns F, G, and H for the S-parameters

Microwave Office Example Showing Columns F, G, and H for the S-parameters

The Excel library for the schematic representation of this model is illustrated in Figure A.19, “Microwave Office Example Library Showing Extra Columns for Subfiles”. For this library, the schematics are in a subfolder named schem. The column header in cell H3 is DATA, but you can name this header anything. If the schematics in column H have subfiles like S-parameters, you should include each subfile in the columns next to column H in the same row as that schematic. You should name the column headers according to the subfiles types: sparameter, awrschematic, awrnetlist, pspicemodel and mdif. For example, if a certain schematic contains three subfiles where two of them are S-parameter files and the other is a schematic, the subfiles for the S-parameters may be included in columns I and J and the subfile for the schematic may be included in column K. There is no preference for which subfile is listed first in the next column after the schematic in column H.

Figure A.19. Microwave Office Example Library Showing Extra Columns for Subfiles

Microwave Office Example Library Showing Extra Columns for Subfiles

For the VSS program, the only type used other than the awrmodel type is the awrschematic type. When using this type, you reference system diagrams exported from NI AWR that have a *.sys extension. Figure A.20, “VSS Example Library Showing AWRSCHEMATIC Type for VSS.” shows the Excel file for the example VSS library using the awrschematic type.

Figure A.20. VSS Example Library Showing AWRSCHEMATIC Type for VSS.

VSS Example Library Showing AWRSCHEMATIC Type for VSS.

A.6.2.6. Optional: Copyright and Summary Settings for 8.0 and older versions

The following lines of an XML file have information about any copyright or summary information. The first three lines of the XML file for this example are shown in Figure A.21, “First Three Lines of the "AWR_Resistors.xml" File”

Figure A.21. First Three Lines of the "AWR_Resistors.xml" File

<COPYRIGHT>This library copyright of AWR</COPYRIGHT>
<SUMMARY>This library contains an AWR Example Library models</SUMMARY>


You can change these settings by inserting a special worksheet as shown in Figure A.22, “Excel Entries to Set Copyright, Summary and "libschema.xml" Location”.

Figure A.22. Excel Entries to Set Copyright, Summary and "libschema.xml" Location

Excel Entries to Set Copyright, Summary and "libschema.xml" Location

The VB script only uses this information if this worksheet is the first worksheet in the Excel file, so its tab is on the far left. The word "copyright" must appear in cell B2 for this special format to be recognized:

Notice that the libschema location (the first line) of Figure A.21, “First Three Lines of the "AWR_Resistors.xml" File” matches the text in cell A2 of Figure A.22, “Excel Entries to Set Copyright, Summary and "libschema.xml" Location”, and is appended to the line above. The text in cell A3 is copied between the COPYRIGHT tags in the XML file, and the text in cell A4 is copied between the SUMMARY tags in the XML file. This special worksheet is included in the example library.

NOTE: For NI AWR Design Environment versions 8.0 and above, you don not need to specify the location of libschema.xml. Instead you include the following line in the XML regardless of where the XML file is.

<XML_COMPONENT_DATA xmlns="urn:awr-lib-data">

A.6.2.7. All Available XML Icons

The following is a complete list of all Microwave Office program icons:

AC, Active, Baluns, Bandpass, Bandstop, Bends, BJT, Cap, Capacitor, Coaxial, Components, Coplanar, Coupled Inductor, Coupled Lines, CPW, Data, DC, Dependent, Device Models, Diode, Electrical, EM Models, FET, Filters, Harmonic Balance, Highpass, ICell, Ideal, Inductor, Interconnects, IV, Junctions, Library, Linear, Linear Devices, Lines, Lowpass, Lumped Element, MeasDevice, Meters, Microstrip, Miscellaneous, Negate, Noise, Noise Models, Nonlinear, NonReciprocal, Passive, Phase, Physical, Ports, PRE_RELEASE, Probes, PwrDivider, Resistor, Resonators, RF Elements, Signal, Signals, Signals (Tone 1), Signals (Tone 2), Sources, SPICE, Stripline, Subcircuit, Substrates, Suspended Stripline, Transformer, Transmission Lines, Universal, UPDATED, User Defined, Volterra, Volterra Devices, and Waveguide.

The following is a complete list of all VSS icons:

802.11, 802.11a, Adders, Amplifiers, Analog, Analog Devices, Analog-Digital, Angle, Antennas, Attenuators, Bandpass, Bandstop, Behavioral, BER, Binary, BPSK, CDMA-3G, Channel Encoding, Channels, Coding/Mapping, Combiners/Splitters, Communication Standards, Complex Envelope, Constants, Converters, Couplers, Data Files, Data Type, dB, Decision, Decoders, Demodulators, De-multiplexers, Detectors, Digital Baseband, Dividers, Encoders, File Based, Files, Filters, Fixed Point, Freq. Multipliers, FSK, General Receivers, GMSK, GSM/EDGE, Highpass, Impedance Mismatch, Interleaving, IS-95, Legacy, Linear Filters, Logic, Lowpass, LTE, Mag/Phase, Math Functions, Math Tools, Matrix, Meters, Mixers, Modulated Signals, Modulation, Modulators, MPSK, MSK, Multiplexers, Multiplexing, Multipliers, National Instruments, Network Analyzers, Network Blocks, Noise, OFDM, OQPSK, PAM, Passive, Phase, Phase Noise, Pi/4 QPSK, PLL, Ports, PRE_RELEASE, Primitives, Pulse, QAM, QPSK, Random, Receivers, RF, RF Blocks, Rohde-Schwarz, Serial-Parallel, Signal Processing, Signal Processors, Simulation Based, Simulation Control, Source Encoding, Sources, Switches, Testing, TESTONLY, Tracking/Feedback, Transcendental, Transient, Transmitters, VCOs, Waveforms, and WiMAX Mobile.

Please send email to awr.support@ni.com if you would like to provide feedback on this article. Please make sure to include the article link in the email.

Legal and Trademark Notice