special_fcts#
Convenience module for calculation of special mathematical functions useful for communications.
- qampy.core.special_fcts.gauss(x, A, x0, w)#
Calculate the Gaussian function with a given amplitude, zero offset and width.
- Parameters:
x (array_like) – Input array variable
A (float) – Amplitude
x0 (float) – Zero offset
w (float) – Width
- Returns:
calculated array
- Return type:
array_like
- qampy.core.special_fcts.q_function(x)#
The Q function is the tail probability of the standard normal distribution see _[1,2] for a definition and its relation to the erfc. In _[3] it is called the Gaussian co-error function.
References
…[1] https://en.wikipedia.org/wiki/Q-function …[2] https://en.wikipedia.org/wiki/Error_function#Integral_of_error_function_with_Gaussian_density_function …[3] Shafik, R. (2006). On the extended relationships among EVM, BER and SNR as performance metrics. In Conference on Electrical and Computer Engineering (p. 408). Retrieved from http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4178493
- qampy.core.special_fcts.rcos_freq(f, beta, T)#
Frequency response of a raised cosine filter with a given roll-off factor and width
- qampy.core.special_fcts.rcos_time(t, beta, T)#
Time response of a raised cosine filter with a given roll-off factor and width
- qampy.core.special_fcts.rrcos_freq(f, beta, T)#
Frequency transfer function of the square-root-raised cosine filter with a given roll-off factor and time width/sampling period after _[1]
- Parameters:
f (array_like) – frequency vector
beta (float) – roll-off factor needs to be between 0 and 1 (0 corresponds to a sinc pulse, square spectrum)
T (float) – symbol period
- Returns:
y – filter response
- Return type:
array_like
References
..[1] B.P. Lathi, Z. Ding Modern Digital and Analog Communication Systems
- qampy.core.special_fcts.rrcos_time(t, beta, T)#
Time impulse response of the square-root-raised cosine filter with a given roll-off factor and time width/sampling period after _[1] This implementation differs by a factor 2 from the previous.
- Parameters:
t (array_like) – time vector
beta (float) – roll-off factor needs to be between 0 and 1 (0 corresponds to a sinc pulse, square spectrum)
T (float) – symbol period
- Returns:
y – filter response
- Return type:
array_like
References
..[1] https://en.wikipedia.org/wiki/Root-raised-cosine_filter
- qampy.core.special_fcts.sech(x, A, x0, w)#
Calculate the hyperbolic secant function with a given amplitude, zero offset and width.
- Parameters:
x (array_like) – Input array variable
A (float) – Amplitude
x0 (float) – Zero offset
w (float) – Width
- Returns:
calculated array
- Return type:
array_like
- qampy.core.special_fcts.supergauss(x, A, x0, w, o)#
Calculate the Supergaussian functions with a given amplitude, zero offset, width and order.
- Parameters:
x (array_like) – Input array variable
A (float) – Amplitude
x0 (float) – Zero offset
w (float) – Width
o (float) – order of the supergaussian
- Returns:
calculated array
- Return type:
array_like
- qampy.core.special_fcts.ttanh(x, A, x0, w)#
Calculate the hyperbolic tangent with a given amplitude, zero offset and width.
- Parameters:
x (array_like) – Input array variable
A (float) – Amplitude
x0 (float) – Zero-offset
w (float) – Width
- Returns:
calculated array
- Return type:
array_like