python - How to Calculate power spectral density using USRP data? -
i wanted plot graph between average power spectral density(in dbm) , frequency (2.4 ghz 2.5 ghz).
the basic procedure used earlier power vs freq plot store data generated "usrp_specteum_sense.py" time period , taking average.
can calculate psd power used in "usrp_spectrum_sense.py"?
there way calculate psd directly usrp data?
there other apporch can used calculate psd using usrp desired range of frquency??
ps: found out psd() in matplotlib, can use solve problem??
i wasn't 100% sure whether or not mark question duplicate of retrieve data usrp n210 device ; however, since poster of question confused , question, let's answer in concise way:
what sdr device usrp give digital samples. these nothing more or less adc (analog-to-digital converter) makes out of voltages sees. then, numbers subject dsp chain frequency shifting, decimation , appropriate filtering. in other words, discrete complex signal's envelope coming usrp should proportional voltages observed adc. physics, means magnitude square of these samples should proportional signal power seen adc.
thus, values "dbfs" (db relative full scale), arbitrary measure relative maximum value signal processing chain might produce.
now, notice 2 things:
- as seen adc important. prior adc there's
- an unknown antenna a) unknown efficiency , b) unknown radiation pattern illuminated unknown direction,
- connected cable might or might not match antennas impedance, , might or might not match usrp's rf front-end's impedance,
- potentially bank of preselection filters different attenuations,
- a low-noise frontend amplifier, depending on device/daughterboard adjustable gain, non-perfectly flat gain on frequency
- a mixer frequency-dependent gain,
- baseband and/or if gain stages , attenuators, adjustable,
- baseband filters, might adjustable,
- component variances in pcbs, connectors, passives , active components, temperature-dependent gain , intermodulation, as
- adc non-linearity, frequency-dependent behaviour.
- proportional important here, since after sampling, there
- i/q imbalance correction,
- dc/lo leakage cancellation,
- anti-aliasing filtering prior to
- decimation,
- and bit-width , numerical type changing operations.
all in all, usrps not calibrated measurement devices. pretty nice, , if chose right 1 specific application, might need calibrate once known external power source feeding your system antenna sampling rate coming out @ end, @ frequency want observe. after knowing "ok, when feed in x dbm of power, see y dbfs, there's factor (x-y) db between dbfs", have calibrated device 1 configuration consisting of
- hardware models , individual units used, including antennas , cables,
- center frequency,
- gain,
- filter settings,
- decimation/sampling rate
note doing such calibrations, in 2.4 ghz ism band require "rf silent" room – it'll hard find office or lab no 2.4 ghz devices these days, , reason why these frequencies free usage microwave ovens interfere; , there's fact these frequencies tend diffract , reflect on building structures, pc cases, furniture metal parts... in other words: access anechoic chamber, reference transmit antenna , transmit power source, , whole antenna system calibration dance results in directivity diagram normally, instead generate "digital value relative transmit power" measurement. whether or not measurement representative how you'll using usrp in lab environment consideration.
that problem of microwave equipment, not usrps – rf propagation isn't easy predict in complex environments, , power characteristics of receiving system isn't determined single component, system whole in intended operational environment. thus, calibration must require either know antenna, cable, measurement frontend, digitizer , dsp , can math including error margins, or calibrate system whole, , change little possible afterwards.
so: no. no matlab function in world can give meaning numbers isn't in these numbers – absolute power, you'll need calibrate against reference.
another word on linearity: usrp's analog hardware @ full gain pretty sensitive – sensitive operating e.g. wifi device in same room screaming in ear, blanking out weaker signals, , driving analog signal chain non-linearity. in case, not voltages observed adc lose linear relation voltages inserted @ antenna port, also, , worse, amplifiers become mixers, unwanted intermodulation introduces energy in spectral places there none. make sure operate device in place make of signal's dynamic range without running nonlinearities.
Comments
Post a Comment