RS Microwave Technical Corner

May/June 2004

RSPLOTTM to the Rescue!

Here is a convenient way to display your electronic data just as a network analyzer would!  Use RSPLOTTM when you receive a filter with electronic or simulation data attached and you wonder how its plotted response looks.

Introduction

RSPLOTTM is an S-parameter data viewer. The program reads S2p files and plots magnitude, phase and delay of the two port S-parameters.  It is written for PCs and runs under Windows.

RS Microwave Company is pleased to make this program available to its customers, free of charge, as part of its customer service.

RSPLOTTM does not require installation as it can be copied and run from any directory on your PC. Simply double-click on the RSplot.exe after you download it.

Loading Data

After you launch the program, click Load Data to load an S2p file. The S2p file format was originally created for Touchstone and has the extension .s2p. S2p files can be stored with various types of data such as S, Z, Y, H, or T parameters. RSPLOTTM can read S2p files of different network parameters; however, it converts to and plots only S-parameters.
S2p File example Every S2p file starts with an option line which starts with a # character. It tells the reader the frequency unit used, network parameter type, value pair format type, and optional termination reference. The following lines contain frequency and parameter value information. Each line consists of one frequency point value and a pair of values for each network parameter - thus, a total of 9 numbers. The pairs are formatted using DB, MA or RI corresponding to dB-angle, magnitude-angle and real-imaginary formats respectively. Please refer to a Touchstone reference for further information.

An excerpt from an .s2p file example is copied below:
 

! Network Analyzer HP8753ES.07.66: Jul 25, 2000
! Hewlett-Packard
! 24 Jun 2003 09:14:55
! Frequency S11 S21 S12 S22
# HZ S DB R 50
800000000 -.0342 29.733 -48.017 -45.096 -47.948 -44.309 .1881 46.656
800625000 -.0311 29.456 -47.964 -46.009 -47.892 -45.746 .1960 46.450
801250000 -.0329 29.184 -47.954 -44.852 -47.790 -45.986 .1981 46.185
801875000 -.0330 28.871 -47.767 -46.236 -47.576 -45.974 .2032 45.946
802500000 -.0309 28.582 -47.443 -45.570 -47.550 -44.848 .2020 45.735

Selecting Data Traces to View

After a file is loaded, you can select from available traces of data by clicking Select View...  In the dialog box, check desired boxes to add them to the plotted traces. You can plot log-magnitude, phase and delay of S11, S21, S12 and S22.
Short cut buttons are provided for mostly viewed data combinations. Here, IL (insertion loss) and RL (return loss) are frequently used "filter design" terms and they refer to -20log|S21| and -20log|S11| respectively.

Changing the Appearance

At the bottom of the window, RSPLOTTM  provides several buttons to control the content and appearance of the plotted graph. First group of buttons are for setting the min-max ranges and titles of axes, traces and markers.

The first button is called Settings... and by clicking it, you can change the titles and displayed ranges of all three axes and number of horizontal and vertical grids. You can also change the title of the graph which is left blank by default.

The second button, Traces..., allows you to delete or rename the traces in the current graph. Once a trace is selected and "deleted", it will be marked as "~deleted~" in the list box. Marking a trace won't delete it until you click OK. Therefore if you delete a trace by mistake, you can remove this text from the name and undelete the trace. You can also change the line type for the traces such as: thin line, thick line, point or circle by clicking the options provided in the Traces dialog box.

You can also add or delete markers to the graph by clicking Markers... button. Markers allow fast checking of the values of S-parameters at specified frequencies. In the Markers dialog box, type the value of the marker frequency in the space provided. Then click Change if you want to change the value of the selected marker, or click Add if you want to add the marker to the list. You can also delete a selected marker by clicking Delete.

The checkbox option Show markers shows or hides the legend in the bottom of the plot. The second option, Keep markers persistent when new data is loaded, is used to copy the markers into subsequent plots so that the values of different data sets can be quickly compared.  For example: where the data from units of the same part are saved as different files, by loading one after another, you can compare the change in values at the same frequency markers.

The last button in the settings group is Legend and it is a shortcut to show or hide the legend area right under the plot area.
The next group of buttons are shortcut scaling buttons. The first two buttons, Inc Span and Dec Span increase or decrease the frequency span of the plot by keeping the center frequency fixed. The Auto Span button sets the plotting frequency range to the maximum range found in the traces. Finally, the Auto Scale button automatically scales the Y-axes which can still be manually altered using Settings... button.

RSPLOTTM  also provides point information where you will find the value of all three axes when you drag the mouse along the plot area. This is useful when you want to view the value of a point roughly. You may find the point information to the left of the About button which is located on the bottom right.

Seen below is a screenshot from a sample .s2p file data.  Insertion Loss and Return Loss format is selected.  Markers are placed at 925, 1100 and 1225 MHz.

Printing

You can print the plotted data to a printer by clicking the Print button. A printer settings dialog box appears waiting for you to change or approve settings. You may temporarily change the settings for the current printout and print the data.  If you want to make your settings default, for example,  landscape paper orientation, make your changes through Start/Settings/Printers.
 

Limitations

RSPLOTTM  requires minimum 3 frequency data points otherwise the program gives an error and does not plot the data.  It can also read up to 4,096 points maximum.  Data beyond 4,096 points is simply skipped with a simple warning.
Finally for convenience, RSPLOTTM converts Hz, KHz frequency values into MHz.

Feedback
Your input is welcomed on RSPLOTTM.  EMAIL us at queries@rsmicro.com regarding any problems you encounter or suggestions to make this program better.  We hope you find it useful.