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 |
Abbreviation for conditional expression - 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 y vector |
linspace(from,to,n) |
Real vector with n lin spaced components between from and to |
logspace(from,to,n) |
Real vector with n log spaced components between from and to |
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) |
Transform polar coordinates m and p into a complex number |
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]]) |
Unwrap angle p (radians) – defaults step = 2pi, tol = 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]) |
Average of vector x . If range given x must 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]) |
Maximum of vector x . If range given x must have a single data dependency |
min(x,y) |
Vrátí menší číslo z x a y |
min(x[,range]) |
Minimum of vector x . If range is given 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]) |
Spline interpolation of vector f using n equidistant points of x |
prod(x) |
Sum of vector elements |
sum(x) |
Sum of vector elements |
xvalue(f,yval) |
Returns x-value nearest to yval in single dependency vector f |
yvalue(f,xval) |
Returns y-value nearest to xval in single dependency vector f |
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. 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 to move DC 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; default zref = 50 ohms |
rtoz(x[,zref]) |
Converts reflection coefficient to impedance; default zref = 50 ohms |
ytor(x[,zref]) |
Converts admittance to reflection coefficient; default zref = 50 ohms |
ztor(x[,zref]) |
Converts impedance to reflection coefficient; default zref = 50 ohms |
N-Port Matrix Conversions¶
stos(s,zref[,z0]) |
Converts S-parameter matrix to S-parameter matrix with a different Z0 |
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 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]) |
Available power gain Ga circles (source plane ) |
GpCircle(s,Gp[,arcs]) |
Operating power gain Gp circles (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]) |
Noise Figure(s) F circles |
PlotVs(data,dep) |
Returns data selected from data : dependency dep |
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 |
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 |