GEEC User ManualGEEC User Manual
Home
GEEC app
Home
GEEC app
  • Getting Started

    • Getting Started with GEEC
  • Circuit Design

    • Circuit Basics
  • Analysis & Simulation

    • Analysis Guide
    • Basic Analyses (Detailed)
    • Other Analyses (FFT, Fourier)
  • Advanced Features

    • Interactive Features
    • Results & Export
    • Project Management
  • Reference

    • Keyboard Shortcuts
    • Troubleshooting & FAQ
    • Expression Reference

Expression Reference

GEEC uses a unified expression syntax across many fields: component values, design variable values, analysis configuration, result expressions, and sweep ranges. This page describes every part of that syntax.

Where Expressions Are Used

ContextExamples
Component value1k, R, 2*R, 1/(2*Pi*f0*C)
Design variable value1000, 1k, 2.2u
Parametric sweep rangelin(100,10k,50), log(1,1Meg,100), 1k,2k,5k
Analysis signal fieldv(out), v(in,out), i(R1)
User result expressiondB(v(out)/v(in)), ph(v(out)), abs(v(out))
Interactive slider bounds100, 1k

Numbers and SI Prefixes

GEEC understands engineering SI prefixes appended directly to a number - no space required.

SuffixValueExample
peta1e151peta
T1e121T
G1e91G
Meg1e61Meg, 2.2Meg
k1e31k, 4.7k
(none)1100, 3.3
m1e-310m = 0.01
u1e-6100u, 4.7u
n1e-947n
p1e-12100p
femto1e-151femto

Special split notation

2k4 is shorthand for 2400. The digit after the SI letter is the decimal part. Examples: 4k7 = 4700, 2m2 = 0.0022.

Note on f (femto)

The suffix f is not supported (it conflicts with the simulation variable f = frequency). Use femto instead.

Suffix matching is case-insensitive except for T (tera) and m (milli) - be careful: 1M (uppercase M) is read as 1m (milli) = 0.001, not mega. Use Meg for mega.


Operators

OperatorMeaning
+Addition
-Subtraction / unary negation
*Multiplication
/Division
^Exponentiation
=Equality (used in solve, subs, etc.)
..Range (used in int(f, x=1..2))
>, <Comparison (symbolic context)

Warning

The colon : is not an arithmetic operator. It is used exclusively in subcircuit signal references such as v(X1:out).


Built-in Constants

These names are reserved and always refer to the given physical constants.

SymbolMeaningValue
PiPi3.14159…
eEuler's number2.71828…
jImaginary unit√(−1)
ooInfinity∞
qElectron charge1.602×10⁻¹⁹ C
cSpeed of light2.998×10⁸ m/s
boltzBoltzmann constant1.381×10⁻²³ J/K
planckPlanck constant6.626×10⁻³⁴ J·s
T0Absolute zero−273.15 °C

Simulation Variables

These identifiers are defined by the simulator during an analysis run. They can be used in result expressions and some analysis config fields.

SymbolMeaningAvailable in
fFrequency (Hz)AC analyses
omegaAngular frequency (rad/s)AC analyses
sComplex frequency (Laplace domain)TF / symbolic
tTime (s)Transient analyses
tempTemperatureParametric sweeps

Signal Reference Syntax

Use these in the Signal config field and in User result expressions to reference circuit quantities.

Node Voltages

SyntaxMeaning
v(node)Voltage at node relative to ground
v(node1, node2)Differential voltage: V(node1) − V(node2)
v(X1:node)Voltage at node inside subcircuit X1
v(X1:X2:node)Voltage inside nested subcircuits

Node names correspond to the labels assigned on the canvas (e.g., a wire labelled out produces node out). Unnamed nodes are assigned numeric names by the simulator.

Branch Currents

SyntaxMeaning
i(Tag)Current through component with tag Tag (e.g., i(R1), i(V1))
i(X1:Tag)Current through component inside subcircuit X1

Component tags are shown in the component properties dialog.


Sweep Range Syntax

Used in parametric sweep fields and the Interactive Sliders range.

SyntaxDescription
lin(start, stop, points)Linear spacing - points values from start to stop
log(start, stop, points)Logarithmic spacing - points values from start to stop
dec(start, stop, ppd)Logarithmic - ppd points per decade
oct(start, stop, ppo)Logarithmic - ppo points per octave
a1, a2, a3, ...Explicit list of values separated by commas

SI prefixes work inside these calls: lin(1k, 10k, 50) sweeps 1000 to 10000 in 50 steps.


Function Reference

All functions listed below are available in component values, design variable expressions, and result expressions. Functions marked CAS are meaningful only in symbolic analyses.

Tips

Use the calculator button next to any expression field to browse available signals and functions interactively.


abs(x)

Absolute value of x. For complex numbers returns the magnitude ∣x∣=re⁡2+im⁡2|x| = \sqrt{\operatorname{re}^2 + \operatorname{im}^2}∣x∣=re2+im2​.

abs(-5)        → 5
abs(3 + 4*j)   → 5
abs(v(out))    → magnitude of output voltage vector

algsubs(f, a=b) CAS

Algebraic substitution — replaces occurrences of a with b inside expression f. Unlike subs, this works even when a appears implicitly (e.g. as part of a product).

algsubs(sin(x)^2 + cos(x)^2, sin(x)^2 = 1 - cos(x)^2)   → 1

applyrule(expr, [rules]) CAS

Applies a list of transformation rules to expr.

applyrule(f(x), [f(x) = x^2])   → x^2

arg(x)

Phase (argument) of complex number x in radians. Equivalent to atan(imag(x)/real(x)) with quadrant correction.

arg(1 + j)    → Pi/4   (≈ 0.785 rad)
arg(-1)       → Pi
arg(v(out))   → phase of output in radians

assume(expr, {a}) CAS

Evaluates expr under assumptions a. Used to constrain variables (e.g. assume a variable is positive or real) before simplification.

assume(sqrt(x^2), {x > 0})   → x

atan(x)

Inverse tangent of x. Returns the result in radians.

atan(0)        → 0
atan(1)        → Pi/4   (≈ 0.7854)
atan(sqrt(3))  → Pi/3

ceil(x)

Rounds x up to the nearest integer.

ceil(1.2)    → 2
ceil(-1.2)   → -1
ceil(3.0)    → 3

coeff(f, x, n) CAS

Extracts the coefficient of xnx^nxn from polynomial f.

coeff(3*x^2 + 5*x + 7, x, 2)   → 3
coeff(3*x^2 + 5*x + 7, x, 1)   → 5
coeff(3*x^2 + 5*x + 7, x, 0)   → 7

collect(f, x) CAS

Collects and combines coefficients of like powers of x in expression f.

collect(a*x + b*x + c, x)   → (a + b)*x + c

complex(re, im)

Constructs a complex number from real part re and imaginary part im.

complex(3, 4)   → 3 + 4*j
complex(0, 1)   → j

confrac(x, var) CAS

Converts expression x to continued-fraction form with respect to variable var.

confrac((s^2 + 2*s + 1)/(s + 1), s)   → continued-fraction form

conj(x)

Complex conjugate of x — negates the imaginary part.

conj(3 + 4*j)   → 3 - 4*j
conj(v(out))    → conjugate of output voltage

cos(x)

Cosine of x (in radians).

cos(0)      → 1
cos(Pi/2)   → 0
cos(Pi)     → -1

cosh(x)

Hyperbolic cosine: cosh⁡(x)=(ex+e−x)/2\cosh(x) = (e^x + e^{-x}) / 2cosh(x)=(ex+e−x)/2.

cosh(0)   → 1
cosh(1)   → 1.543

cph(x)

Continuous phase of vector x in degrees. Unlike ph(x), the output does not wrap at ±180°, making it suitable for reading total phase shift directly or computing group delay.�180�, making it suitable for reading total phase shift directly or computing group delay.

cph(v(out)/v(in))   → continuous phase response in degrees

dB(x)

Converts x to decibels: 20⋅log⁡10(∣x∣)20 \cdot \log_{10}(|x|)20⋅log10​(∣x∣). Works on scalars and vectors.

dB(10)             → 20
dB(0.5)            → -6.02
dB(v(out)/v(in))   → gain in dB across the frequency range

dec(start, stop, ppd)

Generates a logarithmically spaced vector from start to stop with ppd points per decade.

dec(1, 1Meg, 10)    → 70 points from 1 Hz to 1 MHz, 10 per decade
dec(100, 100k, 5)   → 25 points from 100 Hz to 100 kHz

degtorad(x)

Converts angle x from degrees to radians: x⋅π/180x \cdot \pi / 180x⋅π/180.

degtorad(45)    → Pi/4
degtorad(90)    → Pi/2
degtorad(180)   → Pi   (≈ 3.1416)

denom(x) CAS

Returns the denominator of rational expression x.

denom(3/4)              → 4
denom((s+1)/(s^2+2))    → s^2 + 2

diff(f, x) CAS

Differentiates expression f with respect to variable x.

diff(x^3, x)       → 3*x^2
diff(sin(x), x)    → cos(x)
diff(R*C*s + 1, s) → R*C

eval(f, x) CAS

Evaluates expression f at value x.

eval(x^2 + 1, x = 3)   → 10

evalc(x) CAS

Evaluates complex expression x and splits it into explicit real and imaginary parts. Useful after a symbolic computation to obtain a concrete a + b*j form.

evalc((1 + j)^2)   → 2*j
evalc(exp(j*Pi))   → -1

evalf(x)

Evaluates x using floating-point arithmetic, converting symbolic constants to numerical values.

evalf(Pi)       → 3.14159...
evalf(sqrt(2))  → 1.41421...
evalf(1/3)      → 0.33333...

exp(x)

Exponential function exe^xex.

exp(0)     → 1
exp(1)     → 2.71828   (e)
exp(j*Pi)  → -1        (Euler's formula)

expand(x) CAS

Expands expression x by distributing multiplication and powers. Complementary to factor.

expand((x + 1)^2)      → x^2 + 2*x + 1
expand((R + 1)*(R-1))  → R^2 - 1

exponential(x) CAS

Converts all trigonometric functions in x to their exponential form using Euler's formula.

exponential(sin(x))   → (exp(j*x) - exp(-j*x)) / (2*j)
exponential(cos(x))   → (exp(j*x) + exp(-j*x)) / 2

factor(x) CAS

Factors expression x into irreducible components. Complementary to expand.

factor(x^2 - 1)         → (x-1)*(x+1)
factor(s^2 + 3*s + 2)   → (s+1)*(s+2)

floor(x)

Rounds x down to the nearest integer.

floor(1.8)    → 1
floor(-1.2)   → -2
floor(3.0)    → 3

fsolve(f, x)

Solves equation f = 0 for variable x using numerical (floating-point) arithmetic.

fsolve(x^2 - 2, x)      → 1.41421...
fsolve(cos(x) - x, x)   → 0.73909...

gauss(mean, sd, points)

Returns a vector of points values with a Gaussian (normal) distribution with the given mean and standard deviation.

gauss(0, 1, 100)     → 100 normally distributed values, mean=0, sd=1
gauss(1k, 10, 50)    → 50 values centred around 1000 with sd=10

gd(x)

Group delay of x — the negative derivative of phase with respect to angular frequency: −dϕ/dω-d\phi/d\omega−dϕ/dω. Applied to a transfer function vector.� the negative derivative of phase with respect to angular frequency: −dϕ/dω-d\phi/d\omega−dϕ/dω. Applied to a transfer function vector.

gd(v(out)/v(in))   → group delay in seconds across the frequency range

iLT(x) CAS

Inverse Laplace transform of x.

iLT(1/s)         → 1         (unit step)
iLT(1/(s + a))   → exp(-a*t)
iLT(1/(s^2+1))   → sin(t)

imag(x)

Imaginary part of complex number x.

imag(3 + 4*j)   → 4
imag(j)         → 1
imag(v(out))    → imaginary part of output voltage (AC analysis)

int(f, x) / int(f, x=a..b) CAS

Integration. int(f, x) returns the indefinite integral; int(f, x=a..b) returns the definite integral from a to b.

int(x^2, x)           → x^3/3
int(cos(x), x)        → sin(x)
int(x^2, x=0..1)      → 1/3
int(sin(x), x=0..Pi)  → 2

j(x)

Multiplies x by the imaginary unit j=−1j = \sqrt{-1}j=−1​.

j(1)       → j
j(3)       → 3*j
j(v(out))  → j times output voltage

length(x)

Returns the number of elements in vector x.

length(lin(0, 1, 10))   → 10
length(v(out))          → number of simulation time/frequency points

limit(expr, {vars}) CAS

Computes the limit of expr under the conditions given in {vars}.

limit(sin(x)/x, {x = 0})   → 1
limit(1/x, {x = oo})       → 0

lin(start, stop, points)

Generates a linearly spaced vector of points values from start to stop. Used in sweep ranges.

lin(0, 1, 5)        → [0, 0.25, 0.5, 0.75, 1]
lin(1k, 10k, 50)    → 50 evenly spaced values from 1000 to 10000

ln(x)

Natural logarithm (base eee) of x.

ln(1)    → 0
ln(e)    → 1
ln(10)   → 2.302...

log(x) / log(start, stop, points)

When called with one argument: natural logarithm of x (same as ln). When called with three arguments: logarithmically spaced vector from start to stop with points values.

log(1)               → 0
log(e)               → 1
log(1, 1k, 50)       → 50 log-spaced values from 1 to 1000
log(100, 100k, 100)  → 100 log-spaced values from 100 Hz to 100 kHz

log10(x)

Base-10 logarithm of x.

log10(1)     → 0
log10(10)    → 1
log10(1000)  → 3

LT(x) CAS

Laplace transform of x.

LT(1)        → 1/s
LT(exp(-t))  → 1/(s+1)
LT(sin(t))   → 1/(s^2+1)

max(x)

Maximum value of vector x.

max(lin(1, 10, 5))   → 10
max(v(out))          → peak voltage in a transient result

mean(x)

Mean (average) of all elements in vector x.

mean(lin(0, 10, 11))   → 5
mean(v(out))           → DC average of the signal

min(x)

Minimum value of vector x.

min(lin(1, 10, 5))   → 1
min(v(out))          → minimum voltage in a transient result

norm(x)

Normalises vector x so that its element with the largest magnitude equals 1. Useful for comparing waveform shapes independently of amplitude.

norm(v(out))   → output voltage normalised so peak = 1

normal(x) CAS

Converts rational expression x to factored normal form — common factors in numerator and denominator are cancelled. Common factors in numerator and denominator are cancelled.

normal((x^2 - 1)/(x - 1))   → x + 1

numer(x) CAS

Returns the numerator of rational expression x.

numer(3/4)             → 3
numer((s+1)/(s^2+2))   → s + 1

oct(start, stop, ppo)

Generates a logarithmically spaced vector from start to stop with ppo points per octave.

oct(100, 3200, 3)   → 3 pts/octave from 100 Hz to 3200 Hz (5 octaves → 15 points)

parfrac(f, x) CAS

Partial fraction decomposition of rational expression f with respect to variable x.

parfrac(1/(s^2-1), s)     → 1/(2*(s-1)) - 1/(2*(s+1))
parfrac(1/(s*(s+1)), s)   → 1/s - 1/(s+1)

ph(x)

Phase of complex vector x in degrees. Values wrap at ±180°. Use cph for a continuous (unwrapped) result. Use cph for a continuous (unwrapped) result.

ph(1 + j)          → 45
ph(-1)             → 180
ph(v(out)/v(in))   → phase response in degrees

polar(x)

Converts complex number x to polar form, returning modulus and phase.

polar(3 + 4*j)   → modulus = 5, phase = 53.13°
polar(j)         → modulus = 1, phase = 90°

radtodeg(x)

Converts angle x from radians to degrees: x⋅180/πx \cdot 180 / \pix⋅180/π.

radtodeg(Pi/4)   → 45
radtodeg(Pi/2)   → 90
radtodeg(Pi)     → 180

real(x)

Real part of complex number x.

real(3 + 4*j)   → 3
real(j)         → 0
real(v(out))    → real part of output voltage (AC analysis)

rms(x)

Root mean square value of sinusoidal signal x, computed as vpp(x)/(22)v_{pp}(x) / (2\sqrt{2})vpp​(x)/(22​).

rms(v(out))   → RMS voltage of the output waveform

round(x)

Rounds x to the nearest integer.

round(1.4)    → 1
round(1.5)    → 2
round(-1.5)   → -2

simplify(x) CAS

Attempts to simplify expression x into a shorter or more compact form.

simplify(sin(x)^2 + cos(x)^2)   → 1
simplify((x^2 - 1)/(x - 1))     → x + 1

sin(x)

Sine of x (in radians).

sin(0)      → 0
sin(Pi/2)   → 1
sin(Pi)     → 0

sinh(x)

Hyperbolic sine: sinh⁡(x)=(ex−e−x)/2\sinh(x) = (e^x - e^{-x}) / 2sinh(x)=(ex−e−x)/2.

sinh(0)   → 0
sinh(1)   → 1.175

solve(f, x) CAS

Solves equation f = 0 for variable x symbolically. Returns exact solutions.

solve(x^2 - 4, x)         → x = 2, x = -2
solve(s^2 + 3*s + 2, s)   → s = -1, s = -2

sqrt(x)

Square root of x.

sqrt(4)    → 2
sqrt(2)    → 1.41421...
sqrt(-1)   → j

stddev(x)

Standard deviation of the elements in vector x.

stddev(lin(0, 10, 11))   → 3.1623...
stddev(v(out))           → spread of the output signal values

subs(expr, {vars}) CAS

Substitutes the variables in {vars} into expression expr.

subs(R*C*s + 1, {R = 1k, C = 1u})   → 1e-3*s + 1
subs(x^2 + y, {x = 2, y = 3})       → 7

tan(x)

Tangent of x (in radians).

tan(0)      → 0
tan(Pi/4)   → 1
tan(Pi/3)   → 1.732...

tanh(x)

Hyperbolic tangent: tanh⁡(x)=sinh⁡(x)/cosh⁡(x)\tanh(x) = \sinh(x) / \cosh(x)tanh(x)=sinh(x)/cosh(x).

tanh(0)   → 0
tanh(1)   → 0.7616

vpp(x)

Peak-to-peak value of vector x: max⁡(x)−min⁡(x)\max(x) - \min(x)max(x)−min(x).

vpp(v(out))              → peak-to-peak output voltage in a transient result
vpp(gauss(0, 1, 1000))   → approximately 6 (covers ≈ 6σ for a Gaussian)

See also: Interactive Features for design variables and parametric sweeps - Results Export for using expressions in User Results

Prev
Troubleshooting & FAQ