QUCS for Filter Design
QUCS, or Quite Universal Circuit Simulator, is a freeware utility that allows you to draw circuit schematics, and perform AC & DC simulation, noise simulation (for S-parameters, and AC simulations), S-parameter simulation, and a whole lot more upon them.
I first tried QUCS about a ten years ago, and for whatever reason (lack of program maturity, lack of my own persistence) I didn’t give it much time.
Recently however, I dived into the filter synthesis part of QUCS, and I have to say I’m really impressed. QUCS seems to have matured and expanded a lot in version 0.0.19, and this filter synthesis functionality is barely scratching the surface of what this utility can do.
A practical example
Let’s create a simple 3-pole, low pass, Bessel type LC filter. Click the images for a full size version.
- Create a new schematic if you need to.
- At the top menu, under “Tools”, click “Filter synthesis”.
- The filter synthesis window will open. Fill in the parameters as desired. For our example, we are doing an LC filter, Pi type (where the first branch is a shunt), Bessel type, Low pass, Third (order – scroll down to the Example for mathematical info), and a corner frequency of 1 GHz. In this case, the corner frequency will be the 3 dB roll-off point of your filter. We will leave the impedance at 50 ohms.
- Click “Calculate and put into Clipboard”. If your chosen parameters are workable, you will be greeted with the text “Result: Successful”
- Exit the filter synthesis window and return to the schematic editor. The filter circuit which you just designed is in the clipboard and ready to paste into the schematic window.
- Press CTRL-V or go to the “Edit” menu and click “Paste”.
- Align the schematic diagram as you wish, and click the left mouse button. The circuit and its relevant S-parameter simulation is ready for simulation.
- Press F2, or go to the “Simulation” menu and click “Simulate” to run the simulation on your circuit.
- You will be prompted to save the schematic. Do so.
- A new window will open once the simulation is finished. It is blank. Don’t worry.
- In the main dock window, under diagrams, click and drag the “Cartesian” diagram to the main window, then release the left mouse button.
- A new “Edit Diagram Properties” dialog box will appear as soon as you released the left mouse button in step 11. This is where you will choose the data from the simulation to be displayed. We are interested in S11, and S21. S11 will show us the return loss looking into port 1 of the filter. S21 will essentially give us the graphed transfer function of the filter over the frequency range, illustrating how much power will appear at the output of the filter at any given frequency within the simulation range.
- Double-click “dBS11” and “dBS21” in the “Dataset” list on the left of the dialog box, which will insert them into the “Graph” list on the right of this dialog box.
- Click OK and a small Cartesian graph of S11 and S21 will appear in the previously blank page.
- QUCS GUI is a little clunky when it comes to grabbing and resizing graphs, but this can be done. I find myself pressing the Escape key a lot when I’m moving and resizing graphs and markers, etc.
- You can place markers on any trace in any graph, by using the “Place Marker” icon in the toolbar.
- Once the marker is placed, you can select it with the left mouse button, and use the left/right arrow keys to move the marker left/right along the trace, showing pertinent metrics about the trace at that point. For example, dB information in a Cartesian graph, or S-parameter and complex impedance information on a Smith chart.
- To add a Smith chart, simply drag the Smith chart object from the main dock window (under diagrams) to a blank space under your Cartesian graph (for example). The “Edit Diagram Properties” dialog box will appear (as above in step 12) as soon as you released the left mouse button. Double-click the S-parameters you would like displayed to move them from the “Dataset” list on the left of the dialog box, which will insert them into the “Graph” list, as before. In this example I chose to display S[1,1] for S11. Click OK and explore the Smith chart by adding markers.
- You can go back to the schematic window at any time, make changes to components or component values, or add/remove components, etc.
- After making any changes, press F2 or go to the “Simulation” menu and click “Simulate” to re-run the simulation on your circuit. This will update the graphs on the simulation result page automatically.
A couple of useful documents are located below for download.
The full QUCS documentation is located here, and is highly recommended: http://qucs.sourceforge.net/docs.html
Since QUCS is open source, anyone is welcome to fork it. I highly recommend looking at QUCS Studio by Michael Margraf, DD6UM, here: http://dd6um.darc.de/QucsStudio/