uSimmics (formerly QucsStudio) supports three distinct approaches for building custom component models: Equation Components, VerilogA, and C++. This guide explains each method with practical examples, helping you choose the right approach and implement it correctly for accurate device simulation.
What You’ll Learn
- The three user model approaches in uSimmics (formerly QucsStudio) and when to use each
- How to define a simple resistor model using the Equation Component
- How to implement a custom transistor model in VerilogA
- How to place a
.vafile in a project and load it into a schematic - How to select between approaches based on complexity, accuracy, and development effort
Overview of Modeling Approaches
uSimmics (formerly QucsStudio) offers three primary methods for creating user-defined component models. Each serves a different range of complexity and accuracy requirements.
| Approach | Difficulty | Typical Use Case |
|---|---|---|
| Equation Component | Beginner | Linear models, basic electrical behavior |
| VerilogA Model | Intermediate–Advanced | Nonlinear and frequency-dependent models |
| C++ Model | Advanced | High-performance numerical algorithms, custom solvers |
1. Equation Component
The Equation Component lets you define component behavior by typing mathematical expressions directly into the schematic. This is the fastest approach for simple linear models and initial prototyping.
Example: Simple Resistor Model
Goal: Model current flow through a resistor using I = V/R
Step 1: Place the Equation Component
- Launch uSimmics (formerly QucsStudio) and open the schematic editor.
- In the Components panel, expand the nonlinear components section.
- Drag an Equation Component onto the canvas.
Step 2: Define the Equations
- Double-click the component to open its property editor.
- Enter the following in the Equation field:
I = V/R I: computed current (output)V: voltage (input variable)R: resistance (constant)- Add auxiliary equations as needed, for example
V = 5andR = 100.
Step 3: Complete the Circuit and Simulate
- Add a voltage source (
V) and a ground (GND) to close the circuit. - Click Simulate to run the simulation.
- Verify in the results window that
IequalsV/Ras expected.
2. VerilogA Model
VerilogA (Analog Hardware Description Language) is the right choice for components with nonlinear or frequency-dependent characteristics that standard library components cannot capture.
Example: Custom Transistor Model
Goal: Describe a transistor with a custom current-voltage (I-V) relationship
Step 1: Write the VerilogA File
Create a file with a .va extension in any text editor and enter the following code:
module CustomTransistor(n1, n2, n3);
inout n1, n2, n3;
electrical n1, n2, n3;
parameter real Vth = 0.7; // Threshold voltage — transistor turns on above this value
parameter real K = 1.0e-3; // Device constant — scales collector current magnitude
analog begin
if (V(n2, n3) > Vth) begin
I(n1, n2) <+ K * (V(n2, n3) - Vth)^2;
end else begin
I(n1, n2) <+ 0;
end
end
endmodule
Terminal assignments:
– n1: Base
– n2: Collector
– n3: Emitter
Model description:
– Vth: Threshold voltage. Collector current flows only when V(n2, n3) exceeds this value.
– K: Device-specific scaling constant.
– The analog begin ... end block defines the collector current expression.
Step 2: Add the .va File to the Project
- Copy the
.vafile into the uSimmics (formerly QucsStudio) project folder. - Restart uSimmics (formerly QucsStudio) or reload the project.
- Confirm the
.vafile appears in the Content panel.
Step 3: Place the VerilogA Model in the Schematic
- Select the
.vafile in the Content panel. - Move the cursor to the schematic canvas and click to place the model.
- Connect it to other standard components and run the simulation.
3. C++ Model
C++ models are appropriate when a component requires advanced mathematical algorithms or performance-intensive numerical computation, such as integrating an existing C++ library into the simulation. The code structure follows the same external-file pattern as VerilogA. Refer to the official uSimmics (formerly QucsStudio) documentation for the full implementation details.
Choosing the Right Approach
| Situation | Recommended Approach |
|---|---|
| Quick linear model for initial prototyping | Equation Component |
| Nonlinear or frequency-dependent behavior | VerilogA |
| Custom numerical algorithms or external libraries | C++ |
Summary
uSimmics (formerly QucsStudio)’s three user model approaches cover a wide spectrum of modeling needs, from elementary circuit concepts to cutting-edge device physics. Start with the Equation Component to validate your design intent, then move to VerilogA or C++ as accuracy requirements increase. Regardless of approach, model parameters should always be validated against measured device data to ensure simulation fidelity.
Related Articles
- Monte Carlo Analysis in uSimmics (formerly QucsStudio) [2026]
- LPF Design Guide Using uSimmics (formerly QucsStudio) [2026]
- VSWR Analysis with uSimmics (formerly QucsStudio) [2026]
- Microstrip Line Characteristic Impedance Calculation in uSimmics (formerly QucsStudio) [2026]
- Filter Synthesis Tool Guide for uSimmics (formerly QucsStudio)


Comment