Homepage - RF Cafe
Webmaster: Kirt Blattenberger | KB3UON | Sitemap | ©1996-2014     Visit RF Cafe on
      Menu below is just a small sample of what is here!          Visit RF Cafe on Facebook Visit RF Cafe on Twitter Visit RF Cafe on LinkedIn
Custom Search
More than 10,000 searchable pages indexed.
•−•  ••−•    −•−•  •−  ••−•  •
RF Cafe Morse Code >Hear It<

Smith Chart™ for Excel™   v2.1

New Edition Allows Entering Complex Impedance Values Rather Than S-Parameters

Click for full-size screen shot of Smith Chart for Excel - Enter Impedances
<Click here to Download>

(Note: IE8 sometimes has problems with the ZIP. Please use Chrome or Firefox, or, send me an e-mail)


A situation arose at work where we needed to be able to plot complex impedance points taken off the network analyzer display and plot them on a Smith Chart. A modification to the original Smith Chart for Excel permits doing so. If you download the new edition, you will need to enable the Analysis ToolPak (included with Excel as an Add-In) to perform the complex math.

The original Smith Chart for Excel that takes s-parameters as input is detailed below.      ↓     ↓     ↓     ↓     ↓     ↓     ↓     ↓     ↓     ↓ 

This example Excel workbook demonstrates how easy it is to implement a Smith Chart using only a standard x-y scatter chart and coordinate conversions. The workbook shown below used data imported from a typical S-parameter file (in this case an RF2321 amplifier, from RF Micro Devices) and plotted on a chart that uses an image file that contains a Smith Chart. Version 2.0 adds equivalent denormalized impedance with equivalent resistance and capacitance/inductance values. Version 2.1 corrects a graphical equation, but does not affect the accuracy of the previous versions (thanks to Peter for alerting me).

Step-by-step instructions are presented below. Click here to download the example workbook. Click here to download just the background Smith Chart graphic. Finally, click here if you would like a fully-detailed Smith Chart, created in Visio, with impedance and admittance lines.
(Note: IE8 sometimes has problems with the ZIP. Please use Chrome or Firefox, or, send me an e-mail)

If you appreciate the effort it took to develop this workbook, please consider making a donation to RF Cafe by clicking here (at the bottom of the list).

Engineers use spreadsheets for a myriad of applications from calculating cascaded chains of components to PLL phase noise prediction, but I can never recall seeing S‑parameters plotted in a spreadsheet using a Smith Chart1. If a Smith Chart is included in a spreadsheet, it is usually an image pasted in from some other application. This article describes an extremely simple method of implementing a Smith Chart using the built‑in graphing capability of any modern spreadsheet program (Excel is used in this example). All that is required is an accurate graphic of a Smith Chart for use as the chart background image, and a rectangular‑to‑cylindrical coordinate conversion.

Smith Chart for Excel sample screen shot


Example Spreadsheet


Sample Smith Charts for S-parameters

RF2321 Datasheet Excerpt

Although the example given here is used to plot S‑parameters from a file, the possibilities are great for generating any sort of Smith Chart application such as for impedance matching.
A general-purpose amplifier (RF2321) manufactured by RF Micro Devices is used in this example, and its S-parameter file was downloaded from the RFMD website. A copy of the datasheet Smith Charts are given for results comparison. Here are step-by-step instructions for generating your first Smith Chart. Experienced Excel users might want to skip down to the image loading and calibration section.

  • Open a new workbook in Excel.
  • Click the "File/Open..." menu selection and locate the S‑parameter file to be plotted (in this case, “23212725.s2p”). Set the window to display "All Files (*.*)," since the S‑parameter file will most likely not end in an Excel extension.
  • The Text Import Wizard will open. Select the "Delimited" option, then click "Next."
  • Unclick the "Tab" checkbox and select "Space." Scroll down into the data area and verify that the data is separated by vertical lines at the appropriate points (lined up in columns), then click "Next."
  • Click "Finish." You will now have all the data imported into a worksheet. Now would be a good time to save the workbook under a new name (be sure to save it as an Excel worksheet).
  • The data column labels might need to be shifted to line up with the data (results will not be affected if left as is). The data cannot be plotted as imported and must be translated into equivalent circular coordinates (very simple).
  • Click the "Insert/Worksheet" menu selections.
  • Refer to the example spreadsheet as a suggested format for the plotting data.
  • In the "Freq (MHz)" column, use the equation ="Freq"/1e6, where "Freq" is referenced from the S‑parameter import worksheet. This column is not plotted, but is provided as a reference for the S‑parameter.
  • In the "S11x" column, use the equation ="|S11|"*cos(" S11"*PI()/180), where "|S11|" is the magnitude and "<S11" is the angle (usually stored in degrees) as referenced from the S‑parameter import worksheet.
  • In the "S11y" column, use the equation ="|S11|"*sin(" S11"*PI()/180).
  • In the "S22x" column, use the equation ="|S22|"*cos(" S22"*PI()/180).
  • In the "S22y" column, use the equation ="|S22|"*sin(" S22"*PI()/180).
  • That creates the first row of equations. Now, highlight all five cells and grab the "handle at the lower right corner of the highlighted area and drag it down by the number of rows of imported data (201 in this case). You can cut out whatever data you do not want to plot.
  • Use the "Format/Cells..." menu selection to format the numbers to your preference.
  • Highlight the entire group of S‑parameter data (201rows by 4 columns), then click the "Insert/Chart..." menu selection. Click the "XY (Scatter)" chart type and then select the "Scatter with data points connected by lines." picture in the lower left. Do not worry that the preview looks meaningless at this point. Click "Next."
  • Select the "Series" tab. Highlight "Series 1" in the list, then place the cursor in the "Name" edit box and type in S11. The name in the list will change to "S11."
  • Click "Series 2" in the list and then click the "Remove" button.
  • Click "Series 3" in the list and rename it to S22. In the "X Values" edit box, change the "$B" to "$D" on both sides of the colon, then click "Next."
  • Click the "Gridlines" tab and uncheck everything, then click the "Legend" tab and select the "Corner" option. Click "Next," then "Finish."
  • Move the chart to a convenient place on the worksheet, and reshape it to as close to a square as possible. Not being a perfect square will not affect the accuracy of the plotted points, but will make a nasty looking Smith Chart.
  • Click an open area of the graph (the "Plot Area") and use the "handles" to resize the graph to fill the graph window (it will not go all the way to the edge).
  • LOADING THE SMITH CHART IMAGE
  • Right-click in the Plot Area and select the "Format Plot Area..." menu selection, then click the "Fill Effects..." button. Next, click the "Picture" tab and click the "Select Picture..." button.
  • Navigate to where your favorite Smith Chart image is located and select it. The one used in this example can be downloaded from the RF Cafe web site. If you are creating your own version, the best results can be had using a vector image creator (such as Visio) and then saving it in WMF or EMF format. Doing so preserves the sharpness of lines when resizing. It is also necessary to provide white space around the edge of the image to allow for the Excel plot area not being able to extend all the way to the edges. Click Insert. Click the "OK" buttons to close all the formatting windows.
  • CALIBRATING THE SCALES
  • Somewhere on the worksheet enter the numbers -1, 0, and 1 in separate cells. These will be used to set the scale to correspond with the outer circle.
  • Right-click in the Plot Area and choose the "Source Data..." menu selection, then click the "Series" tab.
  • Click the "Add" button and type "-1+j0" in the "Name" edit area. Place the cursor in the "X Values" edit area and select the cell with the "-1" in it. Place the cursor in the "Y Values" edit area and select the cell with the "0" in it. Note that any default values in the edited areas must be overwritten.
  • Click the "Add" button and type "1+j0" in the "Name" edit area. Place the cursor in the "X Values" edit area and select the cell with the "1" in it. Place the cursor in the "Y Values" edit area and select the cell with the "0" in it.
  • Click the "Add" button and type "0+j1" in the "Name" edit area. Place the cursor in the "X Values" edit area and select the cell with the "0" in it. Place the cursor in the "Y Values" edit area and select the cell with the "1" in it.
  • Click the "Add" button and type "0-j1" in the "Name" edit area. Place the cursor in the "X Values" edit area and select the cell with the "-1" in it. Place the cursor in the "Y Values" edit area and select the cell with the "0" in it. Click "OK."
  • Right-click the y-axis and select the "Format Axis..." menu selection, then click the "Scale" tab.
  • Set the "Minimum" value to -1.02, the "Maximum" value to 1.02, and the "Major unit" and "Minor unit" values to 5. Click OK."
  • Right-click the x-axis and select the "Format Axis..." menu selection, then click the "Scale" tab.
  • Set the "Minimum" value to -1.02, the "Maximum" value to 1.02, and the "Major unit" and "Minor unit" values to 5. Click "OK."
  • If the calibration marks do not line up with the unit circle of your Smith Chart, go back and adjust the scales until they do. After calibration, the marks and axis lines and labels can be removed to eliminate clutter.
That's all there is to it. As you can see, the results are identical to the published Smith Chart in the RFMD datasheet. Once you do the first one, the rest will be really easy. Of course, if you do not want to go to the trouble of carrying out the above procedure, you can simply go to the RF Cafe web site (http://www.rfcafe.com) and download the "Smith Chart for Excel" file free of charge. This exact example workbook is what you will be getting. - Enjoy!

REFERENCES
  1. Smith Chart is a registered trademark of Analog Instruments Company, New Providence, NJ

  2. “Field and Wave Electromagnetics,” by David K. Cheng, Addison Wesley, 1983


Please remember to credit RF Cafe for the idea if you use it in a publication!
A Disruptive Web Presence

Custom Search
Over 10,000 pages indexed! (none duped or pirated)

Read About RF Cafe
Webmaster: Kirt Blattenberger
    KB3UON

RF Cafe Software

RF Cascade Workbook
RF Cascade Workbook is a very extensive system cascaded component Excel workbook that includes the standard Gain, NF, IP2, IP3, Psat calculations, input & output VSWR, noise BW, min/max tolerance, DC power cauculations, graphing of all RF parameters, and has a graphical block diagram tool. An extensive User's Guide is also included. - Only $35.
RF system analysis including
frequency conversion & filters

RF & EE Symbols Word
RF Stencils for Visio

Product & Service Directory
Personally Selected Manufacturers
RF Cafe T-Shirts & Mugs

RF Cafe Software

Calculator Workbook
RF Workbench
Smith Chart™ for Visio
Smith Chart™ for Excel
Your RF Cafe Progenitor & Webmaster
Click here to read about RF CafeKirt Blattenberger... single-handedly redefining what an
                                 engineering website should be.

View the YouTube RF Cafe Intro Video Carpe Diem! (Seize the Day!)

5CCG (5th MOB): My USAF radar shop

Airplanes and Rockets: My personal hobby website

Equine Kingdom: My daughter Sally's horse riding website