A Overview of QucsStudio – Electroagenda

The prefix Qucs (Fairly Common Circuit Simulator) refers to a household of electronic circuit simulators that can be utilized at no cost: Qucs Authentic, Qucs-S and QucsStudio. All variants have a really highly effective and efficient graphical interface, which is even higher designed than that of different paid instruments. This makes this simulator very engaging for every type of customers, each for amateurs and in skilled environments.
This text focuses on probably the most bold variant, known as QucsStudio, and opinions all its design and simulation prospects. The detailed ideas and pictures proven under are largely taken from QucsStudio’s personal website, from its example initiatives, or from its demonstration videos.
The content material is organized as follows:
1. Context: Qucs and Variants
This part briefly develops the historical past of the unique Qucs and its evolutions, Qucs-S and QucsStudio.
1.1 Authentic Qucs
Qucs was initially developed by Stefan Jahn and Michael Margraf amongst others. Its unique aim is to develop into a full digital circuit simulator, together with typical SPICE simulations (DC, AC, transient) and in addition these of RF design (S-parameters, Harmonic Stability).
The 2 primary options of Qucs are the next. First, it makes use of its personal simulation engine, Qucsator, which is completely different from SPICE. It additionally has a really nicely designed graphical interface, primarily based on Qt, which gives a really snug and efficient person interface.
1.2 Qucs-S
Qucs-S (additionally known as Qucs with Spice) extends the unique Qucs and permits to make use of, along with Qucsator, free simulation engines primarily based on SPICE (Ngspice, XYCE, SpiceOPus). Its primary builders are Vadim Kusnetsov and Mike Brinson.
1.3 QucsStudio
QucsStudio is one other circuit simulator that has advanced from the unique Qucs mission. Developed independently by Michael Margraf, QucsStudio introduces a brand new simulation engine and provides distinctive options not current within the different variants akin to system simulation, electromagnetic simulation of PCBs, or integration with C/C++, Octave and Kicad.
In follow QucsStudio is probably the most bold model of all these talked about, with many prospects for skilled use, no less than in small environments. The next is an summary of the various kinds of initiatives, simulations and co-simulations that may be carried out.
2. Graphic Interface in QucsStudio
The next picture exhibits an instance of QucsStudio’s graphical interface. The image exhibits a number of sections which are summarized on this part.

As typical, the highest horizontal half comprises the varied menus for working the software. Shortcuts to probably the most incessantly used features (save, launch simulation, transfer up/down within the subcircuit hierarchy, and so on.) are additionally displayed.
Within the left half, vertically, you possibly can choose one of many following tabs. The “Initiatives” tab exhibits all initiatives within the working path. The “content material” tab exhibits all simulation information: schematics, codes (VHDL, verilog, C/C++, Octave), outcomes (information and .dpl shows), information with PCBs and others as .html information (see part 6). Subsequent, the “elements” tab consists of the varied generic parts and controllers that may be included within the schematics for the various kinds of simulation. Lastly, the library tab consists of particular elements from completely different producers.
Within the central half, occupying a lot of the display screen, you possibly can show any of the information talked about within the earlier paragraph for the “Contents” tab. Particularly, within the instance of the picture, the schematic of a circuit on which a transient simulation is configured is proven. Within the schematics, a number of blocks at completely different hierarchy ranges may be made and simply navigated via. The next video exhibits an introductory simulation of QucsStudio and the navigation via subcircuits at completely different ranges:
Subsequent, throughout the rationalization of the completely different prospects of use of QucsStudio, extra photographs and movies are proven that will let you visualize extra particulars and prospects of its graphical interface. As well as, part 5 additionally particulars the probabilities of the software to show outcomes.
3. Digital Design with QucsStudio
The design and simulation of digital circuits with QucStudio is predicated on a number of forms of evaluation. The controllers for all doable forms of evaluation are included within the schematic from the “simulations” menu underneath the “elements” tab. They’re proven within the following graphic:

The next are the doable forms of circuit evaluation divided into three sections: analog (together with RF), digital and system.
3.1 Analog Circuit Design in QucsStudio
This part exhibits the intensive analog circuit design and simulation capabilities of QucsStudio. By together with assist for S-parameters and harmonic stability, QucsStudio extends its prospects from analog design to RF electronics design.
As well as, in QucsStudio there are a number of utilities that can be utilized to assist analog and RF circuit design. These are the next instruments (described in additional element under in part 6): inductive and capacitive element designer, transmission line synthesis, automated filter design, impedance matching and attenuator calculation.
3.1.1 Parts
The next picture exhibits the completely different elements that can be utilized in these simulations together with additionally the element library sections, the place you possibly can choose particular elements with their producers’ references.

Parts from different tabs, akin to digital or system parts may additionally be modeled to work in analog simulations. Furthermore, for the inclusion of elements imported from SPICE or outlined/modeled with equations or in C/C++ and VerilogA information, see part 4 under.
3.1.2 Simulations
The forms of evaluation that may be carried out on an analog schematic are defined under. In all instances a parameter sweep may be carried out, equal to robotically repeating an evaluation with completely different values for the important thing parameters of the schematic.
3.1.2.1 DC Evaluation
DC evaluation permits to acquire the DC voltages and currents that polarize an analog circuit. It consists of a nonlinear steady-state evaluation.
The next video exhibits a easy DC simulation:
3.1.2.2 AC Evaluation
The AC evaluation obtains the linear and steady-state habits of the analog circuit at predetermined frequencies. Beforehand, and robotically, a DC evaluation is carried out to acquire the polarization of the nonlinear elements.
The next video exhibits a easy simulation in AC:
In these simulations additionally it is doable to acquire the noise of the circuit, each in frequency and complete contribution. The origin of the noise is noise sources inserted within the scheme plus the noise generated by the elements themselves. In any case, solely the linear noise contribution with out frequency mixing is analyzed.
3.1.2.3 Transient
Transient evaluation obatins the sign waveform at any level in a circuit. It’s due to this fact a nonlinear evaluation carried out within the time area. The controller may be configured to simulate an entire transient, or to supply the steady-state waveform.
The next video exhibits a easy transient simulation:
The transient evaluation takes under consideration the noise of the elements, along with the noise sources which are added within the scheme.
3.1.2.4 S-Parameters
This evaluation permits to acquire the S parameters of the simulated stage. Just like the AC evaluation, it’s a linear steady-state simulation carried out within the frequency area.
S-parameters from an exterior file may be built-in into the evaluation to be embedded or de-embedded. The software additionally incorporates the equations to robotically calculate the soundness and most achieve parameters in addition to the soundness, achieve and noise determine curves.
The next picture exhibits an S-parameter simulation with among the above-mentioned outcomes:

3.1.2.5 Harmonic Stability
This can be a nonlinear evaluation carried out within the frequency area. On this evaluation, basic tones, their harmonics and their steady-state intermodulation merchandise are obtained.
This fashion, large-signal equivalents may be obtained for AC and S-parameter simulations. As well as, QucsStudio incorporates predefined features that permit the P1dB to be obtained robotically. For sufficiently excessive frequencies, the regular state of a circuit may be obtained extra shortly with this technique than with transient evaluation.
The next video exhibits an instance of a harmonic stability simulation:
In distinction to the AC noise evaluation, the harmonic stability noise evaluation additionally calculates the noise obtained by frequency mixing.
3.1.3 Circuit Tuning
In DC or S-parameter evaluation it’s common to switch the parameters of the circuit elements in an try to satisfy a design situation. There’s a very helpful technique to see how every specific element impacts the simulation end result. Particularly, that is tuning or effective tuning of values.
On this technique, as soon as the simulation has been outlined, the parameters that may be modified and their dynamic vary are indicated. Manually, every parameter may be modified with scroll bars. Concurrently, you possibly can see how the modification of every parameter impacts the results of the simulation.
The next video exhibits a easy instance of handbook tuning:
3.1.4 Circuit Optimization
In lots of instances, circuit tuning just isn’t sufficient as a result of it’s neither sensible nor efficient. That is primarily on account of two causes:
- Initially as a result of there may be many parameters that may change. And searching for a minimal or a most manually in a perform of many variables could be very complicated.
- Then again, as a result of the optimization situations can be a number of affecting completely different outcomes. Consequently, figuring out the route of change required for every parameter just isn’t apparent.
For these events there’s one other performance that optimizes circuits robotically. By indicating the parameters that may be modified, their dynamic vary, the target(s) to be achieved, and the working algorithm, the software iterates with the parameters in an try and optimize the outcomes.
The next video exhibits the optimization of a filter designed with stubs:
Lastly, the next video exhibits the optimization of a diplexer primarily based on discrete elements:
3.1.5 Monte-Carlo Evaluation
The Monte-Carlo technique permits to increase any of the analyses of part 3.1.2 by making an allowance for the tolerance of the schematic parts.
In follow, a number of simulations are carried out robotically. In every of them the parameters current a distinct worth inside their statistical distribution, both regular or uniform. Subsequently it’s doable to watch the variability of the simulation end result relying on the tolerance of the circuit elements.
The next instance exhibits the Monte-Carlo simulation of a 6 dB pi attenuator:

3.1.6 PCB Help
QucsStudio helps PCB design at each manufacturing and simulation stage. On the one hand it’s built-in with KiCad circuit routing software program. Then again it permits to carry out electromagnetic simulations. These functionalities are defined under.
3.1.6.1 PCB Routing
All schematic parts have a selectable footprint, typically with a number of choices. Likewise, for elements modeled by the person, their footprint may be added to be used in routing. On this manner, for every schematic, a simulation and a routing in KiCad may be obtainable concurrently. The next picture exhibits an instance:

3.1.6.2 Electro-Magnetic Simulation
QucsStudio additionally permits to research circuits primarily based on microstrip traces via an electromagnetic subject simulator. The strategy used is finite variations within the time area.
Given a schematic composed of things from the “transmission traces” menu, the software robotically generates the views utilizing the “Create PCB structure” software. The identical S-parameter simulation driver and the identical substrate outlined within the schematic are used to simulate the tracks.
The next video illustrates the best way to carry out electromagnetic simulations from a schematic:
There are different extra subtle methods to create or import routings for electromagnetic simulation. For instance, discrete parts akin to capacitors or resistors may be integrated into the simulation. It is usually doable to immediately create a structure with out the necessity of an related schematic. Lastly, additionally it is doable to import routings from instruments akin to hyperlynx.
The next video exhibits examples together with all of the functionalities mentioned within the earlier paragraph:
3.2 Digital Circuit Design in QucsStudio
This part exhibits the probabilities of designing and simulating digital circuits in QucsStudio. After a short overview of the allowed elements, it’s defined how digital evaluation and assist for VHDL and Verilog description languages work.
3.2.1 Parts
The next image exhibits the completely different elements that can be utilized in digital simulations. They’re principally bit turbines, logic gates, flip-flops and elements outlined in VHDL/Verilog:

Parts outlined in C/C++ information can be included, as detailed in part 4.4 under.
Notice that on this case there is no such thing as a sense in making use of the “nested sweep” element, nor can noise sources be integrated, since strictly digital simulations are carried out.
3.2.2 Digital Simulations
3.2.2.1 Easy Digital Circuits
In its easiest variant, the simulation makes use of easy digital stimuli, both fixed bits or bit sequences. From these stimuli, the evaluation calculates both the reality desk or the chronogram on the outputs, as proven within the following graphs:


3.2.2.2 VHDL / Verilog Help
QucsStudio additionally interprets VDHL / Verilog information, which permits to extend the complexity of the simulated digital circuits. On this manner it’s doable to include elements whose habits is described in VHDL/Verilog information to the schematic and simulate them along with the remainder of the digital elements utilizing the graphical interface of the software. As proven within the following picture:

As well as, VHDL/Verilog information with their very own testbench can be simulated immediately. On this case there is no such thing as a graphical schematic of the circuit, because the simulation is described in a textual content file. Nonetheless, the simulation outcomes may be noticed with the graphical interface of the software. This system is mirrored within the following picture:

3.3 System Design at QucsStudio
This part exhibits the probabilities of designing and simulating programs in QucsStudio, together with probably the most attribute elements and simulation parameters.
3.3.1 Parts
The next graphic exhibits the elements that can be utilized in schematic and system simulations:

It’s clear that the appliance could be very a lot oriented in the direction of high-level simulation of communications programs, each digital and opto-electronic. Logically, noise sources can be added on this case. As well as, as in analog simulations, nested sweeps can be utilized in order that a number of simulations of the system are carried out robotically with the preselected parameter values.
Lastly, additionally it is doable to incorporate elements outlined in C/C++ information, as detailed in part 4.4 under.
3.3.2 System Simulation
System simulation employs the next idea: a block of complicated numbers is shipped to a element that processes them in line with their perform. Output information is then despatched to all elements with which it’s linked. The process is repeated till it passes via all elements.
The primary software is the simulation of communications programs, the place the complicated quantity represents the complex envelope, i.e. the amplitude and part of the service. Subsequently, the simulation controller wants the next parameters:
- Price: signifies the speed at which symbols are despatched per second.
- Samples per image: along with the pace permits to derive the sampling fee of the simulation.
- Variety of symbols: units the full time vary of the simulation.
On this manner, time area indicators (constellations and eye diagrams) may be visualized and information error charges may be measured. The next instance exhibits the simulation of an electro-optical system the place the attention diagram within the receiver is represented as a perform of key parameters:

4. Element Modeling in QucsStudio
The usual and particular elements already included in QucsStudio have been talked about within the earlier part for the various kinds of simulations. Along with these elements, it’s doable so as to add and outline different elements from completely different sources. This part explains the completely different mechanisms that can be utilized by the person to include elements into QucsStudio.
It begins by explaining the straightforward import of SPICE information. Then it’s defined the best way to outline linear and nonlinear elements with equations. Lastly, for the definition of sophisticated parts, modeling in VerilogA and C++ is defined.
Lastly, it is very important level out that the person can create his personal element libraries and combine them into the platform as in the event that they have been native parts.
4.1 Import from SPICE
QucsStudio permits you to import parts from SPICE in a number of methods. The simplest mechanism is so simple as urgent the F2 key from a “.cir” file. The software then robotically generates a schematic together with circuits and subcircuits, elements with predefined fashions (akin to transistors), and simulation controllers.
Within the following graph the talked about process is proven:

Clearly the elements imported from SPICE are legitimate just for analog circuit simulations, as detailed in part 3.1 above.
4.2 Equations
QucsStudio incorporates a number of parts that permit defining each linear and nonlinear elements in a generic manner via equations. These are defined under.
4.2.1 Frequency Definition
The “Frequency Area” element makes it doable to outline a linear component via frequency-dependent parameters (S, Y, Z, H, G, A, T). Frequency dependence may be integrated via the equations figuring out the switch perform within the Laplace area. The weather outlined on this manner can be utilized in each analog and system simulations. The next instance exhibits the flexibleness of this technique:

Notice that the switch perform can be outlined utilizing the variable “freq” as an unbiased variable when it’s outlined by the simulation controller, as in AC or S-parameter simulations:

4.2.2 Nonlinear Element
For non-linear modeling, the “Equation Element” is used. It consists of a number of ports associated to one another. The secret’s that for every of the ports you possibly can outline equations for the present and cargo as a perform of the voltages of any port. That is equal to defining the resistance and capacitance of every port. On this manner nonlinear habits may be modeled as proven within the following instance:

This component can be utilized within the analog simulations defined in part 3.1.
4.2.3 System Equation
Lastly, the “Equation Element” can be utilized for the system simulations of part 3.3. This component permits you to outline an equation as a perform of your enter indicators and time. On this manner, the specified habits may be simply modeled.
4.3 Modeling with VerilogA
The modeling technique talked about above in part 4.2 might not be enough for sophisticated instances. Subsequently QucsStudio consists of assist for the usage of VerilogA, a programming language developed particularly for element modeling. VerilogA is a {hardware} description language that features solely the analog subset of Verilog-AMS directions. Subsequently, these fashions generated with VerilogA are legitimate for all analog simulations detailed in part 3.1.
The next picture illustrates the simulation with a phototransistor modeled with VerilogA. The software permits to assign an emblem to the component bettering the visible side of the schematic.

4.4 Modeling with C/C++
Essentially the most complete strategy in QucsStudio for modeling elements with out limitations is to make use of C/C++. A single textual content file permits you to outline the habits of a element for all obtainable simulation varieties:
- Analog: it’s obligatory to finish a perform for the analog habits and one other for the noise. These features outline the circuit parameters between the completely different nodes outlined within the element. For example of analog mannequin in C/C++ the next code from the QucsStudio template is proven:

- Programs: a perform that specifies the output samples as a perform of the enter samples have to be accomplished. The next code from the QucsStudio template is proven for example of a C/C++ system mannequin:

- Digital: on this case the outline code (each VHDL and Verilog) have to be included contained in the C/C++ file. It’s included within the file as a personality kind variable. For example of a digital mannequin in C/C++ the next code from the QucsStudio template is proven:

Moreover it’s obligatory to point within the file the remainder of the data related to the simulator: international variables, element definition, image and icon, and enter/output parameters primarily. As soon as the file is compiled, the element can be utilized in schematics in the identical manner as proven within the examples above.
5. Simulation Outcomes
The presentation of simulation leads to QucsStudio could be very versatile and versatile, permitting additionally to post-process the leads to a number of methods. This part briefly explains all these functionalities.
5.1 Outcomes Diagrams
Relying on the kind of simulation, it’s handy to make use of various kinds of graphics to current the outcomes. QucsStudio permits representing information within the following codecs: 2D and 3D Cartesian coordinates, polar coordinates, tabulated information, Smith diagrams (impedances and admittances), mixed Smith and polar diagrams, locus curves, chronograms and fact tables for digital simulations, and, lastly, eye diagrams for system simulations. The talked about diagrams may be discovered as an extra element within the “Diagrams” menu underneath the “Parts” tab, as proven within the following picture:

As proven in lots of the examples on this textual content, all diagrams may be included each within the information shows web page and within the circuit schematic. The latter could be very helpful each visually for the person and for sharing schematic-results screenshots with colleagues.
5.2 Equations
Equations may be integrated both within the diagrams themselves or immediately within the graphical interface. Within the latter case, the equations can reply on to modifications within the variables that make them up. On this manner, interactive diagrams may be created to elucidate technical ideas, as proven within the following picture:

5.3 Predefined Features
QucsStudio incorporates by default quite a few features that can be utilized immediately within the diagrams and, in some instances, additionally within the equations defined above. A number of the most related features are listed under:


5.4 Publish-Processing with Octave and C/C++
QucsStudio consists of assist for Octave and C/C++ as defined in part 6 under. This assist makes the evaluation of simulation outcomes rather more versatile.
In a easy manner, QucsStudio may be instructed to run an Octave script, with all its performance, on the finish of a simulation to post-process the outcomes. Additionally, the Octave script can execute features written in C/C++ and compiled as MEX information. Clearly, from Octave additionally it is doable to signify outcomes and post-processed variables with its native graphical interface.
The next instance exhibits a easy analog simulation the place the outcomes are processed and introduced from Octave:

6. Utilities in QucsStudio
This part opinions different utilities included in QucsStudio, primarily apps and assist for various programming languages.
6.1 Apps
Together with typical functionalities for this sort of software akin to creating payments of supplies, QucsStudio options extra complicated purposes that are described under. Along with these talked about under, there’s additionally an software to regulate instrumentation through GPIB, and a gerber viewer (Gerbview).
6.1.1 Element Designer
This software consists of an extra graphical interface for designing the next forms of elements:
- Coils: conventional, conical, multilayer and monolayer spiral.
- Capacitors: bilayer, with parallel traces and with interdigital traces.
The next picture exhibits the graphical interface of the appliance:

6.1.2 Filter Synthesis
Qucstudio additionally has a utility that permits you to design filters of assorted varieties, each with discrete and distributed elements, in addition to with equations. The next video exhibits an instance of filter design from this software:
6.1.3 Transmission Line Calculator
For RF circuit design, QucsStudio additionally has its personal transmission line calculation software. It consists of completely different variants of the next prospects: microstrip, stripline, coplanar, waveguide and coaxial traces.
The next video exhibits the operation with this software:
6.1.4 Attenuator Synthesis
This useful gizmo permits you to calculate the resistances of the most typical attenuators and energy dividers from the attenuation and the enter/output impedance values. Given the enter energy, the appliance additionally calculates the ability dissipated in every resistor. It additionally permits to pick the resistor values closest to the perfect ones in line with the household, and to see how the attenuator is affected.
The next picture exhibits the graphical interface of this software:

6.1.5 Impedance Matching
QucsStudio additionally has a easy software to carry out automated impedance matching at one frequency. Given some S-parameters, the appliance permits to acquire the straightforward matching community for one port, or the simultaneous matching community for 2 ports. It robotically obtains the elements that may be pasted into the schematic with the circuit to be matched.
The next picture exhibits the graphical interface of this software:

6.2 C/C++ assist
QucsStudio helps C/C++ globally, not just for defining and modeling elements as defined above in part 4.4.
From the software you possibly can simply open, generate and edit the “.cpp” textual content information, because it robotically highlights the key phrases. As soon as the C/C++ information are compiled (with the F2 key) an “.exe” file is generated which can also be executable from the software. This permits programming purposes with varied features akin to writing information through the QucsStudio console, studying/writing exterior information or controlling gadgets through GPIB.
Then again, with the suitable directives, C/C++ information can be compiled as “.mex” information, that are interpretable by Octave (as defined under).
6.3 Octave Help
QucsStudio incorporates Octave, permitting you to generate, open, edit and run scripts from throughout the software. Just like C/C++, the built-in textual content editor additionally highlights Octave key phrases.
On this manner it’s doable to write down purposes in Octave with all its native capability of inside features, each for processing and for interplay with the skin (file studying/writing, instructions to exterior ports and graphics show). It is usually doable to write down purposes in Octave that generate a QucsStudio schematic robotically from key parameters outlined as inputs.
By incorporating simultaneous native assist for C/C++ and Octave, Qucstudio permits integrating each languages via “.mex” information (compiled from C/C++). On this manner, combined purposes may be written in Octave, utilizing features written and compiled from C/C++, with full native Octave assist.
Lastly, additionally it is doable to post-process the outcomes of a QucsStudio simulation from Octave, as defined above in part 5.4. This performance additionally permits to carry out a simulation of various domains in batches. For instance, it’s doable to carry out a conventional QucsStudio simulation (analog/digital/system) after which take the outcomes to simulate with Octave/C/C++ digital sign processing (DSP) features that might be applied at different phases.
6.4 HTML Suppport
QucsStudio additionally interprets HTML information. This utility could be very helpful, for instance, to combine a web page in every mission with shortcuts and explanations to every of the information contained within the mission. This technique is used within the QucsStudio examples to facilitate the person’s understanding, as proven within the following picture:

7. QucsStudio Conclusions and Analysis
QucsStudio is a really helpful free software for digital and RF engineers and designers. The simulation capabilities are very versatile and mechanisms are offered to mannequin lacking elements in line with the designer’s wants. The operation of the software could be very simple and on the whole intuitive. As well as, the graphical interface could be very engaging each within the presentation of schematics and within the presentation of outcomes. Typically, even in skilled environments, QucsStudio is a really useful gizmo for the person.
Clearly, QucsStudio additionally has its limitations. It’s typically irritating to seek out {that a} simulation stops converging when a parameter is barely modified. Typically, utilizing QucsStudio requires a deeper information than different instruments, usually paid instruments, the place the convergence of simulations is extra refined. This will result in sudden delays within the design course of.
Subsequently, it may be concluded that QucsStudio is a strong and extremely advisable software for duties associated to digital design. Naturally, it’s within the comparisons with paid instruments the place QucsStudio’s weaknesses may be discovered. However, it is vitally exceptional that model by model QucsStudio has not stopped rising by incorporating increasingly complicated functionalities akin to electromagnetic simulation.
Subscription
If you happen to favored this contribution, don’t hesitate to subscribe to our e-newsletter: