TUchannel

class pylayers.antprop.channel.TUchannel(x=array([], dtype=float64), y=array([], dtype=float64), label=[])[source]

Bases: pylayers.antprop.channel.TBchannel, pylayers.signal.bsignal.TUsignal

Uniform channel in delay domain

Methods Summary

Efirst(toa[, Tint, sym, dB])

calculate the energy of the first path

Efirst_corr(tau0, Sx, Sy[, dB])

calculate Efirst utilizing the correlation of signal emission et reponse impulsionnelle

Efirst_toath(tau0[, Tint, sym, dB])

calculate Efirst

Emax([Tint, sym, dB])

calculate the maximum of Energy integrated over a duration Tint

Epercent([N])

return N percentile delay of a cdf

Etau0([tau0, Tint, sym, dB])

calculate energy around delay tau0

Etot([tau0, taumax, dB])

Etot calculate the energy of the signal

Ewin(tau[, Tint, sym, dB])

integrate energy around delay tau

aggcir(alphak, tauk)

aggregation of CIR from (alphak,tauk)

awgn([PSDdBmpHz, snr, seed, typ, R])

add a white Gaussian noise

ecdf([Tnoise, rem_noise, in_positivity, …])

calculate energy cumulative density function

psd([Tpns, R, periodic])

calculate power spectral density

readcir(filename[, outdir])

read channel impulse response

readuwb(_filename)

read Waveform from Matlab file

tau_Emax()

calculate the delay of max energy peak

toa_cum(th)

calculate time of arrival

toa_cum_tm()

calculate time of arrival

toa_cum_tmt()

calculate time of arrival

toa_cum_tmtm()

calculate time of arrival

toa_max(nint)

calculate time of arrival

toa_max2()

calculate time of arrival max2 method

toa_new()

estimate time of arrival (new method)

toa_th(thlos, thnlos[, visibility])

calculate time of arrival

toa_th_tm()

calculate time of arrival

toa_th_tmt()

calculate time of arrival

toa_th_tmtm()

calculate time of arrival

toa_win(w)

calulate time of arrival (window method)

Methods Documentation

Efirst(toa, Tint=1, sym=0.25, dB=True)[source]

calculate the energy of the first path

toafloat

delay value

Tintfloat

duration value (1)

symfloat

symmetry around delay value ( 0.25)

dB : Boolean

Efirst : Energy amount in the window (in dB if dB)

Efirst_corr(tau0, Sx, Sy, dB=True)[source]

calculate Efirst utilizing the correlation of signal emission et reponse impulsionnelle

tau0 Sx Sy dB

Efirst_toath(tau0, Tint=1, sym=0.25, dB=True)[source]

calculate Efirst

tau0 : Time of flight Tint sym dB : if True return value in dBnJ

Emax(Tint=1, sym=0.5, dB=False)[source]

calculate the maximum of Energy integrated over a duration Tint

A symetry of sym around the max value of the squared signal

Tint: float

Integration time (ns) default 1

symfloat

Symmetry factor (default 0.5)

dBboolean

default False

W1-M1 te = 0.005 ns left = 12 Nright = 33 Tint = 45*te = 0.225 ns sym = 0.25

Epercent(N=10)[source]

return N percentile delay of a cdf

N : 10

Etau0(tau0=0.0, Tint=1, sym=0.25, dB=True)[source]

calculate energy around delay tau0

tau0 : (ns) (0) Tint : Integration time (ns) (1) include the system error sym : symetrie factor 0.5 = symetric (0.25) dB : logscale indicator (True)

Etot(tau0=0.0, taumax=200, dB=False)[source]

Etot calculate the energy of the signal

tau0 : start value for integration dB : (False default) if True value in dB

usage :

s.Etot(tau0=10,dB=True)

Ewin(tau, Tint=1, sym=0.25, dB=False)[source]

integrate energy around delay tau

tau : (ns) (0) Tint : Integration time (ns) (1) include the system error sym : symetrie factor 0.5 = symetric (0.25) dB : logscale indicator (True)

aggcir(alphak, tauk)[source]

aggregation of CIR from (alphak,tauk)

alphakndarray

CIR path amplitude

taukndarray

CIR delay values

>>> from pylayers.signal.bsignal import *
>>> import numpy as np
>>> alphak = 10*np.random.rand(7)
>>> tauk = 100*np.random.rand(7)
>>> tau = np.arange(0,150,0.1)
>>> y = np.zeros(len(tau))
>>> # CIR = TUsignal(tau,y)
>>> # CIR.aggcir(alphak,tauk)
>>> # f,a =CIR.plot(typ=['v'])

(Source code)

awgn(PSDdBmpHz=-174, snr=0, seed=1, typ='psd', R=50)[source]

add a white Gaussian noise

PSDdBmpHz : float snr : float seed : float typ : string

‘psd’ | ‘snr’

R : float

n sn

bsignal.Noise

ecdf(Tnoise=10, rem_noise=True, in_positivity=True, display=False, normalize=True, delay=0)[source]

calculate energy cumulative density function

Tnoise :

Time duration of noise only portion (default=5ns)

rem_noise :

remove noise if True

in_positivity :

inforce positivity if True

normalize :

normalize if True (Not implemented)

display :

display ecdf if True

delay :

give a delay for vizualization

ecdf , vary

psd(Tpns=100, R=50, periodic=True)[source]

calculate power spectral density

RResistance (default 50 Ohms)

Ohms

Tpnsreal

Signal period PRP (default 100 ns)

Note

Notice this interesting property that if time is represented in ns the resulting PSD is expressed in dBm/MHz because there is the same scale factor 1e-9 between second and nanosecond as between dBW/Hz and dBm/MHz

If periodic is False the signal duration is taken as period.

readcir(filename, outdir=[])[source]

read channel impulse response

filenamestring

long file name if outdir is [] short file name is outdir is != []

outdirstring

output directory

readuwb(_filename)[source]

read Waveform from Matlab file

_filename : file name with extension (.mat)

tau_Emax()[source]

calculate the delay of max energy peak

toa_cum(th)[source]

calculate time of arrival

threshold based toa estimation using cumulative energy

toa_cum_tm()[source]

calculate time of arrival

toa_cum_tmt()[source]

calculate time of arrival

toa_cum_tmtm()[source]

calculate time of arrival

toa_max(nint)[source]

calculate time of arrival

descendant threshold based toa estimation

nintinteger

number of intervals

toa_max2()[source]

calculate time of arrival max2 method

toa_new()[source]

estimate time of arrival (new method)

toa_th(thlos, thnlos, visibility=0)[source]

calculate time of arrival

threshold based toa estimation using energy peak

toa_th_tm()[source]

calculate time of arrival

toa_th_tmt()[source]

calculate time of arrival

toa_th_tmtm()[source]

calculate time of arrival

toa_win(w)[source]

calulate time of arrival (window method)

w : parameter between 0 and 100 Lei takes w = 9