Creating Custom User Models in uSimmics (formerly QucsStudio) [2026]

Tools

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 .va file 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

  1. Launch uSimmics (formerly QucsStudio) and open the schematic editor.
  2. In the Components panel, expand the nonlinear components section.
  3. Drag an Equation Component onto the canvas.

Step 2: Define the Equations

  1. Double-click the component to open its property editor.
  2. Enter the following in the Equation field:
    I = V/R
  3. I: computed current (output)
  4. V: voltage (input variable)
  5. R: resistance (constant)
  6. Add auxiliary equations as needed, for example V = 5 and R = 100.

Step 3: Complete the Circuit and Simulate

  1. Add a voltage source (V) and a ground (GND) to close the circuit.
  2. Click Simulate to run the simulation.
  3. Verify in the results window that I equals V/R as 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

  1. Copy the .va file into the uSimmics (formerly QucsStudio) project folder.
  2. Restart uSimmics (formerly QucsStudio) or reload the project.
  3. Confirm the .va file appears in the Content panel.

Step 3: Place the VerilogA Model in the Schematic

  1. Select the .va file in the Content panel.
  2. Move the cursor to the schematic canvas and click to place the model.
  3. 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

Comment

Copied title and URL