Smith Charts for All
I've covered several different programs that are useful when doing electrical engineering in the past. In this article, I want to look at a program called linsmith that helps you do calculations or see how different parameters behave.
Linsmith allows you to generate Smith charts for problems in electrical engineering, especially RF (radio frequency) circuits. Smith charts are a graphical way of representing the rather complex interactions that can happen when dealing with multiple nonlinear electrical components. You can use them to see how they interact and what happens if you vary some of the parameters.
Now, let's look at how to use linsmith to try to make this task a little easier. Throughout this article, I am assuming that you know enough about electrical circuits that I won't need to explain too many of the terms I'm using. If you want to learn more, a good place to start is the Wikipedia page for Smith charts.
First, you will want to install it on your system. It should be in the package management system for your preferred distribution. For example, you can install it on Debian-based distributions with the command:
sudo apt-get install linsmith
Once it's installed, you can start it either by finding it within
the menu system for your desktop environment or by running the
linsmith command within a terminal window.
This program is strictly a graphical one, so you need to be running X11 in order to use it.
When it first starts, you will see a blank Smith chart, ready for use. On the right-hand side of the main window is a set of tabbed panels where you can enter the details of the electrical problem you are working on. This section is broken into loads that you can apply to the system, a circuit tab where you can define discrete circuit elements that are part of the problem, and a results tab where you can find a running log of the calculations being made.
Figure 1. When you first start linsmith, you will see a blank Smith chart, ready for you to use.
Now, let's look at what you can do in terms of applying loads to the system using the Loads tab. This section is actually broken down further into three more sub-tabs. The first one is labeled "R + jX". This tab allows you to enter a load characterized by a frequency, given in mega-Hertz, and an impedance, given as a complex-valued number of Ohms. For example, you could enter a load of 140MHz, with an impedance of (25+j40) Ohms, by entering these values in the appropriate boxes and then clicking the button labeled New directly below them. This will place a new load value in the table of load impedances, and it will display a new yellow dot representing this load on the Smith chart.
Figure 2. Adding a new load adds a yellow point to the Smith chart.
Now that you have a load, you can alter it by adding in extra components. You can do this by clicking on the tab labeled Circuit. In the Component section, you can select from elements, such as capacitors, inductors or even transformers. For each of those components, there is a different set of parameters that you can use to define your new component.
As an example, you could add a capacitor of 40pF by clicking on the capacitor button and entering the value in the "Capacitor value:" text box. If you don't recognize the different component symbols, you can simply hover over them to see a text box appear.
Once you have the values all set, you can click on the New button just below the component section to add this element to your Smith chart. This will add a red line and a red end point on the Smith chart.
Figure 3. You can add components, such as capacitors.
In all cases, you can select an element that already exists to edit its values. When you select an item, you can edit its parameters in the appropriate boxes in the top of the pane. Once you're done, you need to click on the Update button to apply the changes to your Smith chart. These elements can be added either in series or in parallel. This option is in the section of the right-hand side panel labeled Connection.
Clicking on the Edit→Preferences menu item will open a new window where you can set several preferences for how linsmith can work. Several tabs covering several sections of options are available. The first tab, General, sets the most basic of parameters. The screen tab lets you set the image used as the background of the Smith chart, along with what colors you want to use for the various elements. The printing tab lets you set the paper size and margins, along with the colors to use for each of the parts of your Smith chart.
Figure 4. You can set a number of parameters using the preferences window.
In the main display, you should see a number of informational displays for your problem on the bottom bar. This is a Z Smith chart, so the values at the far left-hand side of the bottom bar are coordinates within the chart. On the right-hand side, there is a display of the SWR (Standing Wave Ratio) as well as the Q value for the problem. After this, there is a set of zoom buttons where you can zoom in on sections of the chart to see further details. There also is a button to recalculate the results of the Smith chart based on changes you may have made.
The last two options allow you to change the base values of the Smith chart. You can rotate the chart either to the load or to the generator. You also can change the normalization impedance from the default 50 Ohms to one of 75, 150, 300 or 600.
Once you're done, you can save your work in a few different ways. Under the File menu item, you can select to save either circuit details or load details as a separate file. Each of these sub-menus allows you to save data or load previous data. You also can import data from CSV files and s2p files. To save the final results, you can print the resultant Smith chart either by pressing Ctrl-P or by selecting the File→Print menu item. This way, you can save the chart to a PDF file. Hopefully, linsmith will be a useful tool for electrical engineers to add to their toolboxes.
Limited Time Offer
Take Linux Journal for a test drive. Download our September issue for FREE.
Topic of the Week
The cloud has become synonymous with all things data storage. It additionally equates to the many web-centric services accessing that same back-end data storage, but the term also has evolved to mean so much more.