Quite Universal Circuit Simulator

0
1374

QUCS is a circuit simulator with well-advanced graphical user interface (GUI) which allows setting up of schematics and presenting simulation results in various types of diagrams. Here is an overview of how to start working with it

Pankaj V.


If you have been looking for an easy-to-use circuit simulator with a graphical user interface (GUI), QUCS is the answer. Its well-advanced GUI allows setting up of schematics and presenting simulation results in various types of diagrams. It supports all kinds of circuit simulation, such as DC, AC, S-parameter, transient, noise and harmonic balance analysis along with the availability of mathematical equations and use of a sub-circuit hierarchy (with parametrised sub-circuits). It also supports pure digital simulations using VHDL and/or Verilog, and you can also import existing SPICE models for use in your simulations.

Fig. 1: The main window after opening QUCS
Fig. 1: The main window after opening QUCS
Fig. 2: The QUCS property editor window
Fig. 2: The QUCS property editor window

The latest release comes with an interactive GNU/Octave interface. This new version supports pre-compiled VHDL modules and libraries made from user-written VHDL code, C++ code export of symbol drawings associated with Verilog-A files and direct association of symbol drawings to Verilog-HDL, Verilog-A and VHDL code. You can use sub-circuits equations in Verilog-HDL and VHDL and highlight the syntax for Octave, Verilog-HDL and Verilog-A syntax in text documents. Besides, several new components, such as transistor models NIGBT, HICUM L2 v2.24, HICUM L0 v1.2g and HICUM L0 v1.3, tunnel diode, ideal coupled transmission line and an ideal hybrid are included. And now, the equation solver has an EMI receiver functionality implemented.

System requirements
QUCS code is written in C++ and the software can be run on multiple platforms, viz, Windows, Linux and MacOSx.

Explore Circuits and Projects Explore Videos and Tutorials

Tool suite
QUCS consists of various standalone tools which interact through GUI. The GUI is used to create schematics, set up simulations, display simulation results, write VHDL code, etc; the backend analog simulator a command line program to simulate the schematics; a simple text editor edits the files included by certain components (SPICE netlists or Touchstone files) and displays netlists and simulation logging information; a filter synthesis application, helps design various types of filters; a transmission line calculator help design and analyse different types of transmission lines (microstrips, coaxial cables); a component library holds models for real-life devices (transistors, diodes, bridges, op-amps, etc); attenuator synthesis application helps design various types of passive attenuators; a command line conversion program imports and exports datasets, netlists and schematics from and to other CAD/EDA software.

READ
Yosys: Your Solution for Verilog RTL Synthesis

Getting started
Run the setup file qucs-0.0.17.exe and install the software following all the procedures. The setup will give you an option to install other bundled software, namely, iverilog 0.9.6, Mingw32 0.0.2 which is required for Free HDL, Free HDL 0.0.8 and a download option for Octave. After installing the package, you can launch the program.

Fig. 3: Untitled empty schematic
Fig. 3: Untitled empty schematic
E3C_Fig_4
Fig. 4: The components tab window displaying sources, transmission lines, non-linear components, etc
Fig. 5: Various components of the circuit placed in the schematic area
Fig. 5: Various components of the circuit placed in the schematic area

The main window would appear as shown in Fig. 1. When you open QUCS for the first time, Projects tab on the left hand side will be empty; otherwise, it will display a list of all the projects. Schematic area is on the right hand side; different menu bars and toolbars can be seen on the top of this window.

Since you are opening QUCS for the first time, you can configure the language and appearance settings in the File→Application Settings menu. It will open the QUCS property editor (Fig. 2) where you can make the desired changes. For the changes to take effect, application must be closed and reopened via File→Exit menu or ctrl + Q shortcut.

Create new schematic
For setting up schematics, let us create a new project. Either press the New button above the projects folder or use the menu entry Project→New Project and enter the new project name. After creating the new project, QUCS shifts to Content tab where you can find all the data related to the project, i.e. your schematics, the VHDL files, data display pages, datasets as well as any other data (such as datasheets). Right hand side is the untitled empty schematic (Fig. 3).

To edit the schematic, select the Components tab, it shows the lumped components (such as resistors and capacitors), sources (such as DC and AC sources), transmission lines (such as microstrip, coaxial cable and twisted pair), non-linear components (such as ideal op-amp, transistors), digital components (flip-flops), file components (Touchstone files, SPICE files), simulations (AC or DC analysis), diagrams (cartesian or polar plot) and paintings (texts, arrows and circles) (Fig. 4). Start working on the schematic by placing the components on the schematic area by draging and droping the desired components. You can also click a component once and then move the mouse cursor onto the schematic to click again and put it on that position. Also, you can right click during the mouse movement in order to rotate the components at their final positions.

READ
Graphical Network Simulator that can Run on a Raspberry Pi

Design and analysis
For better understanding of the tool, let us take an example of a simple voltage divider circuit and perform a DC steady-state analysis to compute node voltage and branch currents of the circuit.

Fig. 5 shows various components of the circuit placed in the schematic area using the above-mentioned procedure. These components can be connected using a wiring tool, and wiring mode can be enabled by clicking the wiring icon or by ctrl + E shortcut. Left click on the component’s ports (small red circles) to start a wire and click on the second port to finish the wire. If you want to change the orientation of the wire, right click on it or press ESC key to leave the wiring mode.

Fig. 6: The final circuit
Fig. 6: The final circuit
Fig. 7: A window displaying the diagrams category
Fig. 7: A window displaying the diagrams category
345_Fig_8
Fig. 8: A window displaying divided.V button

For any simulation, a reference potential is required (for the nodal analysis). The ground symbol can be found in the Components tab in the lumped components category, or you can select the same by using ctrl + G shortcut. Also, you need to place the ‘simulation’ block in the schematic for each simulation. For the current simulation, we will place DC Simulation block, which can be found in the Components tab in the Simulations category.

To get the voltage between the two resistors (the divided voltage) as an output in the dataset after simulation, you need to label the wire by double clicking the wire and giving an appropriate name, or by using ctrl + L shortcut. Also, you can choose Insert→Wire Label menu entry. Fig. 6 shows how the final circuit would look like after following the above steps.

Simulation
Select Simulation→Simulate menu entry to start the simulation. Alternatively, you can click the simulation button (gearwheel) or press F2 shortcut.

READ
Modelling With Modelica In OpenModelica

After the simulation, Components tab is changed to diagrams category and related data is displayed. Now you can choose the Tabular from diagrams and place it on the data display page. After dropping the Tabular, the diagram, a dialog box appears as shown in Fig. 7. Double click divided.V to add the graph (i.e., values in a Tabular plot) to the diagram. Similarly, other items listed in the dataset list can be put into the graph.

Now you can see the value of the node voltage divided.V, which is 0.5V. That was expected since the values of the resistors are the same and the DC voltage source produces 1V (Fig. 8).

Other features
Having made your first successful simulation of QUCS, now you can extend your simulation for a better understanding of the circuit by changing the component properties either by clicking on the divider.sch tab or using the F4 shortcut, or by selecting the Simulation→View Data Display/Schematic menu entry. Afterwards, double click on any resistor (say R1), which will open a component property dialog box where you can edit all the properties of the selected component. Change the values and properties of the component and observe the results.

Also, if you do not want QUCS to change automatically to the associated display data, you can change the behaviour of the document by changing the settings. You can go to the document settings dialog box by right clicking on the free space on the schematic area and selecting the Document Settings menu, item in the context menu which pops up or by selecting the File→Document Settings menu entry.

Useful tool
QUCS is an easy-to-use and handy tool for circuit designers. Not only it supports all kinds of simulation types but it also allows you to have multiple simulations with one design, by allowing you to change the parameters and properties of the components. QUCS helps in better understanding of the circuit design as well as components. Availability of mathematical equations makes it a useful tool for the designers and educators as well as learners.


The author is a technical journalist at EFY Gurgaon

LEAVE A REPLY