The procedure for requesting AWR support has changed. Please read all about the new AWR product support process.
Page tree
Skip to end of metadata
Go to start of metadata

Contents

Overview

Installation

Running the Script

Step-by-Step Instructions

Create Frequency Dependent AMP_F Data File

Create Power Dependent AMP_F Data File

Create Passive Device Data File

Make AMP_B2/RFATTEN Subcircuit

Make MIXER_F Subcircuit

Overview

This utility helps translate data sheet specifications into behavioral models for a select number of RF devices used in AWR Design Environment’s (AWRDE) Virtual System Simulator (VSS). The following VSS elements are supported:

  • AMP_F:   RF Amplifier whose performance is defined by a data file
  • LIN_F and LIN_F2: Passive RF devices whose performance is defined by a data file
  • AMP_B2: RF Amplifier
  • MIXER_F: RF Mixer whose performance is defined by a data file.

Creating these models using data from a manufacturer's data sheet is normally a manual process involving copying from either graphs or tables into AWRDE text files or equations in a system diagram. This process tends to be time consuming and prone to errors in both transferring the data sheet values to the text file as well as ensuring proper formatting of the data file. To assist in the process of transferring the manufacturer's data sheet specifications to compatible text files and system diagram subcircuits, a Python based script has been developed.

One input method uses two-port Touchstone formatted data files supplied by the device manufacturer. The script reads in this data and then converts this data to the formatting required for the device appropriate text file. The following shows the data entry screen for reading in Touchstone data:

The other input method involves importing an image file of a graph from the manufacturer's data sheet int the script. By a series of mouse clicks on the image trace, the data can be effectively digitized. The following picture shows the data entry screen for importing image files:

Installation

The script is written in the Python programming language. Only source code is being made available which necessitates the installation of Python on the user's computer. Fortunately Python is freely available. Follow this link for detailed instructions on installing Python.

In addition to the core Python, several modules need to be installed: numpy, matplotlib, pyqt5, pyawr, and pyawr_utils. From Windows Command or Powershell, type the following:

pip install numpy
pip install matplotlib
pip install pyqt5
pip install pyawr
pip install pyawr-utils


The script can be downloaded from this link. Unzip the MakeRF_Device.zip file and ensure all the files are in the same directory.

Running the Script

The script can be launched from any Python compatible integrated development environment (IDE). IDLE comes as part of the standard Python install and is the one demonstrated here. From Windows Start, locate IDLE under the Python group:

Once IDEL opens, then File > Open and navigate to the directory where the unzipped script files exist and select MakeRF_Device_TOP_LEVEL.py. In the next IDLE dialog box Run > Run Module

If successful, the Make RF Device Main Window will appear

Clicking on the yellow buttons opens new dialog boxes specific for each VSS RF element. Here is a brief overview of each selection

Create Frequency Dependent AMP_F Data File

The AMP_F element refers to data files that are formatted in one of two ways: frequency dependent and power dependent. Please see the help file for the AMP_F element for more details on these file formats. For this selection, the frequency dependent format data file is created. RF frequency is the independent variable. The following are the dependent variables:

  • s21/Gain
  • s12/Reverse Isolation
  • s11/Input Return Loss
  • s22/Output Return Loss
  • Noise Figure
  • IP3
  • IP2
  • IP2H: Second Harmonic Intercept Point
  • P1 dBm

The result is a text file saved in the user designated directory

Create Power Dependent AMP_F File

In this selection for creating an AMP_F file, the format is power dependent where input power is the independent variable. Sometimes referred to AM/AM, AM/PM format. The following are the dependent variables:

  • Output Power
  • Output Phase
  • IM3: Third order intermodulation distortion
  • IM2: Second order intermodulation distortion
  • H2: Second harmonic distortion
  • Noise Figure

The result is a text file saved in the user designated directory

Create Passive LIN_F/LIN_F2 Data File

This creates a data text file for passive devices. This text file is compatible with LIN_F and LIN_F2 elements. Frequency is the independent variable. The following are the dependent variables:

  • Gain/Loss
  • Input Return Loss
  • Output Return Loss

The result is a text file saved in the user designated directory

Make AMP_B2/RFATTEN Subcircuit

AMP_F, LIN_F and LIN_F2 elements cannot be used for yield analysis. In order to perform yield analysis, AMP_F files are used to construct a system diagram that contains an AMP_B2 element. For passive devices, LIN_F/F2 data files are used to construct a system diagram that contains and RFATTEN element.

Before using this selection, AMP_F or LIN_F/F2 files must be created using the above selections and then imported into an AWR project. AWRDE must be running with project that contains the imported AMP_F or LIN_F/F2 files opened.

The result is a system diagram that can be used as a subcircuit in another top level system diagram

Make MIXER_F Subcircuit

This selection is used to create a system diagram containing a MIXER_F element. This subcircuit is compatible with yield analysis.

AWRDE must be running.

The result is a system diagram that can be used as a subcircuit in another system diagram. In addition a spur chart compatible with the MIXER_F element is imported into the project.

The following frequency data can be input:

  • Conversion Gain
  • Noise Figure
  • IP3
  • IP2
  • P1 dBm
  • RF Port Return Loss
  • IF Port Return Loss
  • IF Frequency Response
  • Spur Chart

Step-by-Step Instructions

Create Frequency Dependent AMP_F Data File

From the Make RF Device main dialog box, click on Create Frequency Dependent AMP_F Data File. This will open the AMP_F Frequency Dependent Main Window:

Settings

Set Frequency Range

From the Settings tab:

Enter the Start and Stop frequencies. All data will be interpolated/extrapolated(1) to fit within this frequency range.

(1) Extrapolation is a misnomer. Data will be pinned to the nearest data point

Enter the frequency units.

Click the Apply button associated with the Frequency entry to update the frequency range values.

Enter Independent Variables

Independent variables are explained in the help file for the AMP_F element. This allows more than one data set in the AMP_F data file to account for different measurement conditions such as temperature or bias setting. Independent variables show up as VAR statements in the AMP_F data file. This script accommodates up to two independent variables.

From the Settings tab:

For each independent variable, check the checkbox near the ‘VAR 1’ or ‘VAR 2’ label.

Enter the independent variable name

Enter the variable values separated by a comma. These variable values can either be numeric or alphanumeric.

Click the associated Apply button.

Default Directory

This is the directory where the AMP_F text file will be stored. It is suggested that the image files and .s2p files prepared ahead of time be also stored in this directory.

From the Settings tab:

Click the Browse button to open a file browser

File Name

This is the name of the text file for the AMP_F element. File name entry does not require a file extension. The extension .txt will automatically be appended.


The following example shows an example of the Settings tab after editing:

Data Entry

Under the Data Entry tab, check the checkbox associated with the parameters to be included in the AMP_F data file.

All S Parameters includes s21, s12, s11 and s22. Alternately, the S-parameters can be chosen individually.

For power and distortion related data entry, the entry can either be input or output referred to accommodate the data sheet’s information. However all data will be converted to output referred when writing the AMP_F data file.

The following shows the Data Entry tab with All S Parameters and Noise Figure as the selected parameters

Click the parameter’s associated Edit button to open the Data Entry dialog box.

The following shows the Data Entry dialog box for All S Parameters:

All S Parameters data can only be entered using .s2p files. For individually selected S-parameters, then a choice of either entering using a .s2p file or from an image is available:

For File Base data entry, click the File Based Input tab.

One can change the graph scaling either manually or using the Auto Scale button associated with either the x or y axis.

Show Data Points button displays the data points (red dots) that will be written to the final AMP_F data file. The number of data points can be set using the Num Data Points entry and associated Apply button.

The following shows the Data Entry tab after re-scaling and applying the Show Data Points:

Tabular Entry

Under the Tabular Input tab, the data is displayed in a table. The values can be edited. Rows can be inserted or deleted.

Entering next Independent Variable data

Return to the Settings tab in the Data Entry dialog box. Choose a new data file and from the Independent variable pull-down menu, select the independent variable value.

Return to the File Based Input tab to read in the new data. Then return to the Tabular Input tab and click Exit Data Entry. The Data Entry dialog box will close and AMP_F Frequency Dependent Main Window will be the active window.

From the AMP_F Frequency Dependent Main Window under the Data Entry tab, select the next parameter’s Edit button. The Data Entry dialog box will once again open.

For parameters other than S-parameters, the data must be entered from an image. This example shows Noise Figure parameter.

Select the Image Based Input tab

The data image file will be imported as shown:

Calibration of the lower-left and upper-right graph points is required before entering any data. Set the Lower Left and Upper Right x and y values. Note that for x values, which in this case are frequencies, the units must be the units used during the original configuration. For example, the original configuration used GHz units. Even though this graph uses MHz units, the x values entered in Lower Left X and Upper Right X are in GHz.

Click the Pick Lower Left Point button and using the left mouse button, select the lower left point on the graph. A green dot will appear. Repeat with Pick Upper Right Point and choose the upper right point on the graph.

Once the graph is calibrated, use the left mouse button to select the data points. Right mouse button will remove a single data point. Clear Data Points button will remove all data points. The data point color can be changed to blue if desired (for example if the image trace is red, you may want blue data point dots).

As in the case of file based entry, the data points for image based entry can be edited under the Tabular Input tab. And as in the case of file based entry, return to the Settings tab to choose the next independent variable value. When data entry is complete, click the Exit Data Entry button under either the Image Based Input or Tabular Input tabs.

Write AMP_F File

Once again the AMP_F Frequency Dependent Main Window will be the active. Once all parameter data has been entered, select the Write File/Exit tab. The status window will show the state of each parameter for each independent variable combination. Use this to ensure all data has been entered.

Click Write AMP_F File. This will write the AMP_F file into the default directory. A message box will appear showing the location of the data file:

Create Power Dependent AMP_F Data File

From the Make RF Device main dialog box, click on Create Frequency Dependent AMP_F Data File. This will open the AMP_F Power Dependent Main Window:

The Settings tab is very similar to the Settings tab in the section A. Create Frequency Dependent AMP_F File. Please see that section for an explanation of the entry fields.  The one difference here is that input power is used as opposed to frequency.

Data Entry

Similar to the procedure outlined in section A. Create Frequency Dependent AMP_F File, use the Data Entry tab to select the parameters to be included in the AMP_F data file.

Pout vs. Pin (Output power versus input power) is a required parameter, all the others are optional. Note that for distortion related parameters, the data is entered versus output power. This aligns with how data is presented in several representative mixer data sheets. This data will be converted so that the x-axis is input power when writing the AMP_F power dependent text file. Shown here is IM3 vs Output Power data entry after clicking the associated Edit button.

The Data Entry dialog box for power dependent AMP_F is identical to that used for frequency dependent AMP_F. See the above section on how to use the Data Entry dialog box. Power dependent AMP_F data entry is only image based (relies on importing an image taken from the device data sheet).

Writing the AMP_F file. In the AMP_F Power Dependent Main Window, select the Write File/Exit tab. Ensure all data has been entered by viewing the entries in the status window. Then click the Write AMP_F File button to write the AMP_F file in the selected default directory.

Create Passive Device Data File

Use this selection for creating frequency dependent files for passive devices. Similar to files compatible with frequency dependent AMP_F elements, the files created for this selection are compatible with LIN_F or LIN_F2 elements.

Settings, data entry and writing the LIN_F/F2 are the same as for the frequency dependent AMP _F file. See section  Create Frequency Dependent AMP_F Data File for details. Parameters, however, are limited to gain and return loss:

Selecting Return Loss applies the same data to both the input and output ports. Otherwise, input and/or output return loss can be selected independently.

Make AMP_B2/RFATTEN Subcircuit

AMP_F and LIN_F/F2 elements have a limitation in that one cannot use these elements for yield analysis. For yield analysis, AMP_B2 elements can be setup for statistical variation. For passive devices, RFATTEN element can support statistical variation. This selection takes the AMP_F or LIN_F/F2 data files created in the above selections and produces a system diagram that contains either AMP_B2 for active devices or RFATTEN for passive devices. The AMP_B2 system diagram is partially shown here:

The system diagram created is intended to be used as subcircuit that can be included in a top level system diagram.

The script generates the entire system diagram including the AMP_B2/RFATTEN element, ports, wires between ports and the device as well as all the equations needed to convert data contained in the  AMP_F/LIN_F2 data files into data compatible with AMP_B2/RFATTEN elements.

In the created system diagram are a series of equations labelled <parameter>_stat_variable as shown:

Edit the properties of these equations to modify the statistical parameters.

Before running the script, AMP_F or LIN_F/F2 files must be generated using the procedure described in the sections above. The files must be imported into an AWR Design Environment project. AWRDE must be running and opened to the project with the imported files.

From the Make RF Device main dialog box, select Make AMP_B2/RFATTEN Subcircuit to launch the following dialog box.

Under Select AMP_F/LIN_F Data File, click on the desired data file name.

In the System Diagram Name entry, enter the name of the system diagram to be created.

If there are independent variables in the data file, these will be displayed as well as the ranges. In the entry boxes, choose values within the displayed range. Discrete values must be separated by commas. Only these values will be available in the finished system diagram.

The file format cannot be automatically assessed. Please use the radio buttons to indicate if the data file is formatted for AMP_F or for LIN_F/F2.

After clicking Create Subcircuit temporary system diagram and graph will be created in the opened project, simulations performed, and the final system diagram created. The temporary system diagram and graph will be removed from the project.

Make MIXER_F Subcircuit

This is similar to the previous section where in this case a system diagram is created that contains the MIXER_F element.

The final system diagram is configured for either up conversion or down conversion. For down conversion, the MIXER_F MODE parameter is set to DIFF and an RFATTEN element is placed at the output as shown:

The RFATTEN element only gets added if the user inputs IF Response data.

For up conversion, the RFATTEN is placed at the input and the MIXER_F MODE is set to SUM as shown:

Upon clicking Make MIXER_F Subcircuit from the Make RF Device main dialog box the MIXER_F Main Window is opened:

Settings tab

RF Port Frequency

For up conversion, this is the output port of the mixer. For down conversion, this is the input port of the mixer. Enter the Start and Stop frequencies as well as the frequency units, then click the associated Apply button to accept the edits.

Independent Variables

Up to two independent variables can be entered. For each independent variable check the checkbox, enter the independent variable name, enter the list of comma separated values and then click the associated Apply button to accept the edits.

Default Directory

This is the directory where a text file will be created. This text file is used to store user input data. It is suggested that the data sheet image files be stored in this directory as well.

MIXER System Diagram Name

Name of the system diagram to be created

Data Entry tab

Enter the parameters in the Data Entry tab

All data except for spurs is entered from image files created from the Mixer’s data sheet.

Isolation data is entered in the spur chart.

Clicking Edit for all parameters other than Spur Chart opens the Data Entry dialog box. Details on how to enter data is located in the A. Create Frequency Dependent AMP_F Data File section.

Clicking Edit for Spur Chart opens the Spur Chart Data Entry dialog box:

The M,N spur suppression values are entered as positive values. Note that spur suppression levels above 100 will be ignored unless the SUPPLIM parameter in the MIXER_F element is adjusted after the system diagram has been generated.

Multiple RF Frequencies and LO Power can be used, that is a separate spur chart can be generated to each RF Frequency and LO Power Combination. Click Apply to generate a spur chart for the selected RF Frequency and LO Power settings.

Click Exit to close the Spur Chart Data Entry dialog box.

Generate System Diagram

From the Generate Model/Exit tab in the MIXER_F Main Window dialog box, click Generate Mixer Model.

The system diagram will be created in opened AWRDE project. Additionally the spur chart will be imported into the project as a text data file. The name of the data file will be the same as the system diagram name with _SpurTable appended.

If yield analysis is to be used with the MIXER_F system diagram, edit the properties of the _stat_variable equations


  • No labels