- Qucs -
Quite Universal Circuit Simulator

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

Seznam funkcí

abs adjoint angle arccos arccosec arccot arcosech arcosh arcoth arcsec arcsin arctan arg arsech arsinh artanh avg besseli0 besselj bessely ceil conj cos cosec cosech cosh cot coth cumavg cumprod cumsum dB dbm dbm2w deg2rad det dft diff erf erfc erfcinv erfinv exp eye fft fix floor Freq2Time GaCircle GpCircle hypot idft ifft imag integrate interpolate inverse kbd limexp linspace ln log10 log2 logspace mag max min Mu Mu2 NoiseCircle norm phase PlotVs polar prod rad2deg random real rms Rollet round rtoswr rtoy rtoz runavg sec sech sign sin sinc sinh sqr sqrt srandom StabCircleL StabCircleS StabFactor StabMeasure stddev step stos stoy stoz sum tan tanh Time2Freq transpose twoport unwrap variance vt w2dbm xvalue ytor ytos ytoz yvalue ztor ztos ztoy

Matematické funkce

Vektory a matice: Vytváření

eye(n) Vytvoří n x n identickou matici
linspace(od,do,n) Vytvoří reálný vektor s n lineárně rozloženou komponentou mezi od a do, zahrnující oboje
logspace(od,do,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)

Základní matematické funkce: Základní reálné a komplexní funkce

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) Fáze úhlu v radiánech komplexního čísla
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) Imaginární část komplexních čísel
mag(x) Velikost komplexního čísla
norm(x) Absolutní hodnota vektoru na čtverec
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) Převádí úhel z radiánů na stupně
real(x) Reálná část komplexního čísla
sign(x) Funkce signum
sqr(x) 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) Exponenciální funkce do základu e
limexp(x) Limitovaná exponenciální funkce
log10(x) Dekadický 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 sinus
tan(x) Funkce tangens

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

arccos(x) Arc cosinus
arccosec(x) Arc kosekans
arccot(x) Arc kotangens
arcsec(x) Arc sekans
arcsin(x) Arc sinus
arctan(x[,y]) Arc tangents

Základní matematické funkce: Hyperbolické funkce

cosh(x) Hyperbolický cosinus
cosech(x) Hyperbolický kosekans
coth(x) Hyperbolický cotangent
sech(x) Hyperbolický sekans
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

Základní matematické funkce: Zaokrouhlování

ceil(x) Zaokrouhlí na další vyšší celé číslo
fix(x) Oddělí desetinná místa od reálného čísla
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) Doplňková 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) Rokoková funkce

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) Root Mean Square of vector elements
runavg(x) Running average of vector elements
stddev(x) Standard deviation of vector elements
variance(x) Variance of vector elements
random() Náhodné číslo mezi 0,0 a 0,1
srandom(x) Give random seed

Data Analysis: Basic Operation

cumprod(x) Cumulative product 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) Product 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

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
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 S-parameter matrix to Y-parameter matrix
stoz(s[,zref]) Converts S-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 Y-parameter matrix to S-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) Mu' 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

Immediate

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

Number suffixes

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 DC voltage at node nodename
name.I DC current through component name
nodename.v AC voltage at node nodename
name.i AC current through component name
nodename.vn AC noise voltage at node nodename
name.in AC noise current through component name
nodename.Vt Transient voltage at node nodename
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 Imaginary unit ("square root of -1")
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

Nahoru