Krátký popis matematických funkcí

Následující operace a funkce mohou být aplikovány v Qucs rovnicích. Parametry v závorkách “[ ]” jsou volitelné.

Operátory

Aritmetické Operátory

+x

Jednočlenný plus

-x

Jednočlenný mínus

x+y

Součet

x-y

Rozdíl

x*y

Násobení

x/y

Dělení

x%y

Dělení beze zbytku (Modulo)

x^y

Mocnina

Logické Operátory

!x

Negace

x&&y

Logický součin

x||y

Logický součet

x^^y

Nonekvivalence

x?y:z

Zkratka pro podmíněné výrazy “Když x tak y jinak z” (if x then y else z)

x==y

Rovnost

x!=y

Nerovnost

x<y

Menší než

x<=y

Menší, nebo rovno

x>y

Větší

x>=y

Větší, nebo rovno

Matematické funkce

Vektory a matice: Vytváření

eye(n)

Vytvoří n x n identickou matici

length(y) Returns the length of the given vector
linspace(from,to,n)

Vytvoří reálný vektor s n lineárně rozloženou komponentou mezi od a do, zahrnující oboje

logspace(from,to,n)

Vytvoří reálný vektor s n logaritmicky rozloženou komponentou mezi od a do, zahrnující oboje

Vektory a matice: Základní maticové funkce

adjoint(x)

Adjungovaná matice x (Přenesená a složená)

det(x)

Determinant matice x

inverse(x)

Obrácená matice x

transpose(x)

Přenesená matice x (řady a sloupce jsou prohozeny)

Absolutní hodnota, důležité u komplexních čísel

abs(x)

Absolutní hodnota, důležité u komplexních čísel

angle(x)

Fáze úhlu v radiánech komplexního čísla. Synonymum pro arg()

arg(x)

Komplexně sdružené číslo

conj(x)

Komplexně sdružené číslo

deg2rad(x)

Převádí fázi ze stupňů na radiány

hypot(x,y)

Euklidova distantní funkce

imag(x)

Velikost komplexního čísla

mag(x)

Absolutní hodnota vektoru na čtverec

norm(x)

Fázový úhel komplexního čísla (ve stupních)

phase(x)

Fázový úhel komplexního čísla (ve stupních)

polar(m,p)

Mění protichůdné souřadnice (velikostm, fáze p) na komplexní číslo

rad2deg(x)

Reálná část komplexního čísla

real(x)

Reálná část komplexního čísla

sign(x)

Funkce signum

Druhá mocnina čísla

Druhá mocnina čísla

sqrt(x)

Druhá odmocnina

unwrap(p[,tol[,step]])

Unwraps the angle (opravdu netuším jak to přeložit) p (v radiánech – základně ; step je 2*pi) s použitím volitelné hodnoty tolerance tol (zálkadně je pi)

Základní matematické funkce: Exponenciální a logaritmické funkce

exp(x)

Limitovaná exponenciální funkce

limexp(x)

Dekadický logaritmus

log10(x)

Binární logaritmus

log2(x)

Binární logaritmus

ln(x)

Přirozený logaritmus (základ e )

Základní matematické funkce: Trigonometrie

cos(x)

Funkce cosinus

cosec(x)

Kosekans

cot(x)

Funkce kotangens

sec(x)

Sekans

sin(x)

Funkce tangens

tan(x)

Funkce tangens

Základní matematické funkce: Opačné trigonometrické funkce

arccos(x)

Arc cosinus

arccosec(x)

Arc kotangens

arccot(x)

Arc sekans

arcsec(x)

Arc sinus

arcsin(x)

Arc sinus

arctan(x[,y])

Arc tangents

Základní matematické funkce: Hyperbolické funkce

cosh(x)

Hyperbolický kosekans

cosech(x)

Hyperbolický cotangent

coth(x)

Hyperbolický sekans

sech(x)

Hyperbolický sinus

sinh(x)

Hyperbolický sinus

tanh(x)

Hyperbolický tangents

Základní matematické funkce: Opačné hyperbolické funkce

arcosh(x)

Opačná funkce k hyperbolickému cosinu

arcosech(x)

Opačná funkce k hyperbolickému kosekanu

arcoth(x)

Opačná funkce k hyperbolickému cotangetu

arsech(x)

Opačná funkce k hyperbolickému sekanu

arsinh(x)

Opačná funkce k hyperbolickému sinu

artanh(x)

Opačná funkce k hyperbolickému tangentu

Zaokrouhlí na další vyšší celé číslo

ceil(x)

Zaokrouhlí na další vyšší celé číslo

fix(x)

Zaokrouhlí na další nižší celé číslo

floor(x)

Zaokrouhlí na další nižší celé číslo

round(x)

Zaokrouhlí na nejbližší celé číslo

Základní matematické funkce: Speciální matematické funkce

besseli0(x)

Modifikovaná Besselova funkce

besselj(n,x)

Modifikovaná Besselova funkce prvního druhu a n-tého druhu

bessely(n,x)

Bessel function of second kind and n-th order

erf(x)

Chybná funkce

erfc(x)

Invertovaná chybná funkce

erfinv(x)

Invertovaná chybná funkce

erfcinv(x)

Inverzní doplňková chybná funkce

sinc(x)

Synchronizační funkce (sin(x)/x nebo 1 na x = 0)

step(x)

avg(x[,range])

Rozbor dat: Základní statistiky

avg(x[,range])

Aritmetický průměr vektorových prvků; pokud je dán rozsah pak xmust have a single data dependency

cumavg(x)

Souhrný průměr vektorových prvků

max(x,y)

Vrátí větší číslo z x a y

max(x[,range])

Maximální hodnota ve vektoru. Pokud je dán rozsah, pak x must have a single data dependency

min(x,y)

Vrátí menší číslo z x a y

min(x[,range])

Minimální hodnota ve kektoru; Pokud je dán rozsah, pak x must have a single data dependency

rms(x)

Running average of vector elements

runavg(x)

Standard deviation of vector elements

stddev(x)

Variance of vector elements

variance(x)

Náhodné číslo mezi 0,0 a 0,1

random()

Náhodné číslo mezi 0.0 a 0.1

srandom(x) Give random seed

Cumulative product of vector elements

cumprod(x)

Cumulative sum of vector elements

cumsum(x) Cumulative sum of vector elements
interpolate(f,x[,n]) Equidistant spline interpolation of real function vector f(x) using n equidistant datapoints; the latter can be omitted and defaults to a reasonable value
prod(x)

Sum of vector elements

sum(x) Sum of vector elements
xvalue(f,yval) Returns the x-value which is associated with the y-value nearest to a specified y-value yval in a given vector f; therefore the vector f must have a single data dependency
yvalue(f,xval) Returns the y-value of the given vector f which is located nearest to the x-value xval; therefore the vector f must have a single data dependency

Data Analysis: Differentiation and Integration

ddx(expr,var) Derives mathematical expression expr with respect to the variable var
diff(y,x[,n]) Differentiate vector y with respect to vector x n times. If n is omitted it defaults to n = 1
integrate(x,h) Integrate vector x numerically assuming a constant step-size h

Data Analysis: Signal Processing

dft(x) Discrete Fourier Transform of vector x
fft(x) Fast Fourier Transform of vector x
fftshift(x) Shuffles the FFT values of vector x in order to move the frequency 0 to the center of the vector
Freq2Time(V,f) Inverse Discrete Fourier Transform of function V(f) interpreting it physically
idft(x) Inverse Discrete Fourier Transform of vector x
ifft(x) Inverse Fast Fourier Transform of vector x
kbd(x[,n]) Kaiser-Bessel derived window
Time2Freq(v,t) Discrete Fourier Transform of function v(t) interpreting it physically

Electronics Functions

Unit Conversion

dB(x) dB value
dbm(x) Convert voltage to power in dBm
dbm2w(x) Convert power in dBm to power in Watts
w2dbm(x) Convert power in Watts to power in dBm
vt(t) Thermal voltage for a given temperature t in Kelvin

Reflection Coefficients and VSWR

rtoswr(x) Converts reflection coefficient to voltage standing wave ratio (VSWR)
rtoy(x[,zref]) Converts reflection coefficient to admittance; by default reference zref is 50 ohms
rtoz(x[,zref]) Converts reflection coefficient to impedance; by default reference zref is 50 ohms
ytor(x[,zref]) Converts admittance to reflection coefficient; by default reference zref is 50 ohms
ztor(x[,zref]) Converts impedance to reflection coefficient; by default reference zref is 50 ohms

N-Port Matrix Conversions

stos(s,zref[,z0]) Converts S-parameter matrix to S-parameter matrix with different reference impedance(s)
stoy(s[,zref])

Converts Y-parameter matrix to S-parameter matrix

stoz(s[,zref])

Converts Y-parameter matrix to Z-parameter matrix

twoport(m,from,to) Converts a two-port matrix from one representation into another, possible values for from and to are ‘Y’, ‘Z’, ‘H’, ‘G’, ‘A’, ‘S’ and ‘T’.
ytos(y[,z0])

Converts Z-parameter matrix to Y-parameter matrix

ytoz(y) Converts Y-parameter matrix to Z-parameter matrix
ztos(z[,z0]) Converts Z-parameter matrix to S-parameter matrix
ztoy(z) Converts Z-parameter matrix to Y-parameter matrix

Amplifiers

GaCircle(s,Ga[,arcs]) Circle(s) with constant available power gain Ga in the source plane
GpCircle(s,Gp[,arcs]) Circle(s) with constant operating power gain Gp in the load plane
Mu(s) Mu stability factor of a two-port S-parameter matrix
Mu2(s)

Rollet stability factor of a two-port S-parameter matrix

NoiseCircle(Sopt,Fmin,Rn,F[,Arcs]) Generates circle(s) with constant Noise Figure(s) F. Arcs specifies the angles in degrees created by e.g. linspace(0,360,100). If Arcs is a number it specifies the number of equally spaced circle segments, if it is omitted this number defaults to a reasonable value
PlotVs(data,dep) Returns a data item based upon vector or matrix vector data with dependency on a given vector dep, e.g. PlotVs(Gain,frequency/1e9)
Rollet(s) Rollet stability factor of a two-port S-parameter matrix
StabCircleL(s[,arcs]) Stability circle in the load plane
StabCircleS(s[,arcs]) Stability circle in the source plane
StabFactor(s) Stability factor of a two-port S-parameter matrix. Synonym for Rollet()
StabMeasure(s) Stability measure B1 of a two-port S-parameter matrix

Nomenclature

Ranges

LO:HI Range from LO to HI
:HI Up to HI
LO: From LO
: No range limitations

Matrices and Matrix Elements

M The whole matrix M
M[2,3] Element being in 2nd row and 3rd column of matrix M
M[:,3] Vector consisting of 3rd column of matrix M

Vector

2.5 Real number
1.4+j5.1 Complex number
[1,3,5,7] Vector
[11,12;21,22] Matrix

tera, * 1e+12

E exa, 1e+18
P peta, 1e+15
T tera, 1e+12
G giga, 1e+9
M mega, 1e+6
k kilo, 1e+3
m milli, 1e-3
u micro, 1e-6
n nano, 1e-9
p pico, 1e-12
f femto, 1e-15
a atto, 1e-18

Name of Values

S[1,1] S-parameter value
nodename.V

AC current through component name

name.I

AC noise voltage at node nodename

nodename.v AC voltage at node nodename
name.i

Transient voltage at node nodename

nodename.vn

Transient current through component name

name.in AC noise current through component name
nodename.Vt

Imaginary unit (“square root of -1”)

name.It Transient current through component name

Note: All voltages and currents are peak values. Note: Noise voltages are RMS values at 1 Hz bandwidth.

Constants

i, j

Boltzmann constant = 1.38065e-23 J/K

pi 4*arctan(1) = 3.14159...
e Euler = 2.71828...
kB Boltzmann constant = 1.38065e-23 J/K
q Elementary charge = 1.6021765e-19 C

back to the top