AFPchannel¶
-
class
pylayers.antprop.channel.
AFPchannel
(x=array([], dtype=float64), y=array([], dtype=float64), tx=array([], dtype=float64), rx=array([], dtype=float64), az=array([], dtype=float64), label='', _filename='', refinement=False, ang_offset=0)[source]¶ Bases:
pylayers.signal.bsignal.FUsignal
Angular Frequency Profile channel
- xnp.array
frequency ,Nf
- ynp.array
Amplitude Na,Nf
- txnp.array
tx coordinate (,3)
- rxnp.array
rx coordinates (,3)
- aznp.array (,Na)
AFP azimutal range in radians
theta : link elevation angle phi : link (txrx) azimuth angle (with offset) tau : link delay (ns)
- offsetfloat angle in radians
azimuth offset w.r.t global frame
norm2 construct electrical_delay loadmes toadp estimate peak specular_model
Methods Summary
construct
(tx)electrical_delay
([tauns])electrical delay
estimate
([taumax, phimax])estimate specular model parameters
loadmes
(_filename, _filecal[, fcGHz, BW, …])Load measurement file
norm2
()peak
()specular_model
(x, fGHz, phi[, wH, HPBW, GmaxdB])Creates an AFP from a discrete specular model
toadp
([imax])convert afp into adp (frequency->delay)
Methods Documentation
-
estimate
(taumax=200, phimax=6.283185307179586)[source]¶ estimate specular model parameters
taumax : float phimax : float
specular_model
-
loadmes
(_filename, _filecal, fcGHz=32.6, BW=1.6, win='rect', ang_offset=0.37, ext='txt', dirmeas='meas/Espoo', refinement=False)[source]¶ Load measurement file
Measurement files and the associated back to back calibration files are placed in the mes directory of the project.
- _filenamestring
data matfile name
- _filecalstring
calibration matfile name
- fcGHzfloat
center frequency
- BWfloat
measurement bandwidth
- winstring
window type in [‘rect’,’hamming’,’blackman’]
- ang_offsetfloat
angle in radian
- extstring
file extension ‘txt’ | ‘.mat’
diremeas : string
This function updates : + self.x (frequency GHz) + self.y + self.az azimuth radians
The calibration file _filecal (.mat file) should be added in the data directory In practice for Espoo B2B.mat
pylayers.util.pyutil.getlong
-
specular_model
(x, fGHz, phi, wH=[], HPBW=0.17453292519943295, GmaxdB=21)[source]¶ Creates an AFP from a discrete specular model
x : [a0,a1,..,aK,tau0,tau1,…,tauk,phi0,…,phiK] fGHz : phi : wH : windowing on frequency axis HPBW : Half Power Beamwidth
>>> import numpy as np >>> rs = np.random.seed(1) >>> E = st.expon(0.5) >>> K = 5 >>> tauk = 250*np.random.rand(K) >>> alphak = E.rvs(K) >>> phik = 2*np.pi*np.random.rand(K) >>> xk = np.hstack((alphak,tauk,phik)) >>> A = AFPchannel() >>> fGHz = np.linspace(27,29,2001) >>> wH = np.ones(len(fGHz)) >>> phi = np.linspace(0,2*np.pi,73) >>> A.specular_model(xk,fGHz,phi,wH)