Porting GNU Radio to Buildroot: application to an embedded digital network analyzer
Texte intégral
(2) Outline Embedded digital electronics Project 1. 8-bit microcontroller 2. 32-bit microcontroller (bare metal). 1. Raspberry Pi 4 single board computer (4×1.5 GHz CPUs). 3. 32-bit microcontroller (libraries). 2. Python/GNU Radio userspace applications. 4. 32-bit microcontroller (executive environment). 3. Communication with personal computer (0MQ). 5. 32/64-bit microcontroller (operating system). 4. Web-controlled instrument (REMI). 6. 32/64-bit microcontroller (kernel module). 5. Characterization of spectral properties of radiofrequency device. 7. 32/64-bit microcontroller (kernel-userspace communication) 8. 32/64-bit microcontroller/FPGA (Redpitaya co-design) 9. 32/64-bit microcontroller/FPGA radiofrequency signal processing. I frequency sweep network analyzer I broadband noise source + FFT I pulsed excitation + FFT 6. ringdown measurement of resonant system: Q & fr Top-down development. Bottom-up development. 2 / 16.
(3) Acoustic transducer I. Electromagnetic wavelength: λ = 300/fMHz. I At 1 GHz: 30 cm wavelength ⇒ signal processing (e.g. cavities, transformer, filters, waveguides) will be ' λ wavelength I Acoustic waves propagate ∈ [500..10000] m/s: at 3000 m/s, 105 slower I Convert between electromagnetic and acoustic wave using piezoelectric substrates: 30 cm become 3 µm wavelength I 40-50 filters/phone, 1.4 billion phones/year ⇒ >50 billion acoustic filters/year 1 8/24/2016 10:22:53 AM 1311.6010K42-103899-La. Trc1. S21 dB Mag 10 dB/ Ref -50 dB Cal. 0. 1 M2. -10. M1 134.3981 MHz -60.8503 dB M2 137.4600 MHz -9.9392 dB. -20 -30 -40 -50dB -50. M1. -60 -70 -80 -90 -100. Ch1 Start 100 MHz Trc2. Pwr 0 dBm Bw 10 kHz. S21 Phase 50°/ Ref 0° Cal. Stop 200 MHz 2. 250. M1 134.3981 MHz -48.78 ° M2 137.4600 MHz -121.69 °. 200 150 100 50. 0°0. M1. -50 -100 -150. M2. 3 / 16.
(4) Acoustic transducer I. Electromagnetic wavelength: λ = 300/fMHz. I At 1 GHz: 30 cm wavelength ⇒ signal processing (e.g. cavities, transformer, filters, waveguides) will be ' λ wavelength I Acoustic waves propagate ∈ [500..10000] m/s: at 3000 m/s, 105 slower I Convert between electromagnetic and acoustic wave using piezoelectric substrates: 30 cm become 3 µm wavelength I 40-50 filters/phone, 1.4 billion phones/year ⇒ >50 billion acoustic filters/year 1 8/24/2016 10:22:53 AM 1311.6010K42-103899-La. Trc1. S21 dB Mag 10 dB/ Ref -50 dB Cal. 0. 1 M2. -10. M1 134.3981 MHz -60.8503 dB M2 137.4600 MHz -9.9392 dB. -20 -30 -40 -50dB -50. M1. -60 -70 -80 -90 -100. Ch1 Start 100 MHz Trc2. Pwr 0 dBm Bw 10 kHz. S21 Phase 50°/ Ref 0° Cal. Stop 200 MHz 2. 250. M1 134.3981 MHz -48.78 ° M2 137.4600 MHz -121.69 °. 200 150 100 50. 0°0. M1. -50 -100 -150. M2. 4 / 16.
(5) Acoustic resonator. 432.443174 MHz. 433.218974 MHz. 0. 30. 0. 30. 0.2. 28. 0.2. 28. I Electromagnetic wave: 70 cm wavelength → acoustic wave: 7 µm. 0.4. 26. 0.6. 24. 0.8. 22. 1. Y (mm). I Dual surface acoustic wave (SAW) resonator operating in the 433.05–434.79 MHz ISM band. Y (mm). 0.4. 1.2. 1.4. 18. 1.4. 1.6. 16. 1.6. 1. 1.5. 22. 1. 20. 0.5. 24. 0.8. 1.2. 0. 26. 0.6. 2. 20 18 16 0. 0.5. X (mm). I 2-port device used either in reflection or transmission. Trc3. 30. 0. 28. 0.2. 0.4. 8/ 27/ 2020 12:33:10 PM 1311.6010K42-103899-La. S21 dB Mag 2 dB/ Ref -10 dB Cal. 1. 2. reflectivity. 0 0.2 0.6. 24. 0.8. 22. 1. 0.02 0.018. 0.4. 26. Y (mm). @ 434 MHz. 1.5. X (mm). 434.368974 MHz. Y (mm). I Q'. 104. 1. 0.016. 0.6. 0.014. 0.8. 0.012. 1. 0. 1.2. 20. 1.2. -2. 1.4. 18. 1.4. -4. 1.6. 16. 1.6. 0.01 0.008 0.006. -6. 0. -8. 0.5. 1. 1.5. X (mm). 2. 0. 0.5. 1. 1.5. 2. X (mm). -10dB -10 -12 -14 -16 -18 -20. Ch1 Center 434 MHz Trc2. Pwr -10 dBm Bw 10 kHz. S21 Phase 10°/ Ref -10° Cal. Span 2.5 MHz 2. 40 30 20 10 0 -10 -10° -20 -30 -40 -50 -60. Ch1 Center 434 MHz. SENSeOR SEAS10 sensor. Pwr -10 dBm Bw 10 kHz. Span 2.5 MHz. 5 / 16.
(6) Principle Objective: characterize frequency response of a radiofrequency device under test (DUT). DUT. DVB−T source. USB. RPi4 GNU Radio. PC. Eth 0MQ. I Instrument control: GNU/Linux running on Raspberry Pi 4 (RPi4) I Source: broadband source (noise/pulse) ... I ... generated by a GPIO of the Raspberry Pi connected to its radiofrequency clock I Acquisition & sampling: R820T2 based DVB-T receiver as general purpose Software Defined Radio (SDR) receiver I Processing: GNU/Radio communicating with PC 6 / 16.
(7) Noise source: reflection mode I Broadband noise source (reverse-polarized Zener diode + amplifiers) I Sample 2.2 MHz-wide bandwidth I Transpose from 434 MHz to baseband. source. receiver. 7 / 16.
(8) Noise source: transmission mode Rather than voltage divider bridge to ground, resonator pair in series with signal source. receiver. source. Options. Variable. Title: Not titled yet. Id: samp_rate. Output Language: Python. Value: 2.2M. Generate Options: QT GUI. osmocom Source. QT GUI Time Sink. Sync: Unknown PPS. in. Number Channels: 1 Sample Rate (sps): 2.2M. Number of Points: 1.024k Sample Rate: 2.2M Autoscale: No. Ch0: Frequency (Hz): 434M. command. Ch0: Frequency Correction (ppm): 0 Ch0: DC Offset Mode: 0 Ch0: IQ Balance Mode: 0 Ch0: Gain Mode: False Ch0: RF Gain (dB): 44 Ch0: IF Gain (dB): 20. out. in freq bw. QT GUI Frequency Sink FFT Size: 4.096k Center Frequency (Hz): 0. freq. Bandwidth (Hz): 2.2M. Ch0: BB Gain (dB): 20. 8 / 16.
(9) Pulsed source. 0.5 ns. Transmission spectra as a function of pulse duration. 0.625 ns. 1.0 ns. + − 1.25 ns. 2.22 ns. ADCMP580. threshold. 9 / 16.
(10) GNU Radio running on the Raspberry Pi4 Characterization of a band pass filter using micro-HDMI output of RPi4 Options. Variable. Title: Not titled yet. Id: samp_rate. Output Language: Python. Value: 32k. Generate Options: QT GUI. Low Pass Filter Decimation: 1. Noise Source Noise Type: Gaussian Amplitude: 1 Seed: 0. Gain: 1. out. in. Throttle Sample Rate: 32k. out. cadencement du flux. in. Sample Rate: 32k Cutoff Freq: 6.4k Transition Width: 3.2k Window: Hamming Beta: 6.76. out. in freq bw. QT GUI Frequency Sink FFT Size: 1.024k Center Frequency (Hz): 0. freq. Bandwidth (Hz): 32k. filtre à caractériser. # !/ usr / bin / env python3 from PyQt5 import Qt from gnuradio import qtgui from gnuradio . filter import firdes class rpi ( gr . top_block , Qt . QWidget ) : def __init__ ( self ) : gr . top_block . __init__ ( self , " Title " ) Qt . QWidget . __init__ ( self ) self . _ q t g u i _ f r e q _ s i n k _ x _ 0 _ w i n = sip . wrapinstance ( self .→ ,→ q t g u i _ f r e q _ s i n k _ x _ 0 . pyqwidget () , Qt . QWidget ) self . l ow _ p a s s _ f i l t e r _ 0 = filter . fir_fi lter_cc f (1 , firdes .→ ,→low_pass ( 1 , samp_rate , samp_rate /5 , samp_rate /10 , →. self . b l o c ks _ t h r o t t l e _ 0 = blocks . throttle ( gr . s i z e o f _ g r _ c o m p l e x→ ,→*1 , samp_rate , True ) self . a n a l o g _ n o i s e _ s o u r c e _ x _ 0 = analog . nois e_sourc e_c ( analog .→ ,→GR_GAUSSIAN , 1 , 0) # ####################################### # Connections # ####################################### self . connect (( self . analog_noise_source_x_0 , 0) , ( self .→ ,→blocks_throttle_0 , 0) ) self . connect (( self . blocks_throttle_0 , 0) , ( self .→ ,→low_pass_filter_0 , 0) ) self . connect (( self . low_pass_filter_0 , 0) , ( self .→ ,→qtgui_freq_sink_x_0 , 0) ) [...]. 10 / 16.
(11) Using a GPIO as radiofrequency source. I PiFM: route an internal radiofrequency phase locked loop to a GPIO pin I Radiofrequency source, generalized to a generic IQ stream by F5OEO... I ... now as a GNU Radio sink block2 ⇒ flexible signal source for generating a single tone, a frequency swept tone or a broadband noise (pseudo-random generator). 2 https://github.com/jmfriedt/gr-rpitx. and J.-M Friedt, É. Courjaud, gr-rpitx: GNU Radio compatible general purpose SDR emitter using the Raspberry Pi(4) internal phase locked loop, European GNU Radio Days (2021) 11 / 16.
(12) Beyond RF device characterization Autonomous ACARS3 (plane-to-ground communication) receiver running on RPi4. 3 https://sourceforge.net/projects/gr-acars/ 12 / 16.
(13) Useful tools I I I I I I I. Buildroot for developing on the RPi4 or qemu GNU Radio running on RPi4 ZeroMQ or UDP socket to stream from RPi4 to PC Python TCP server on RPi4 to receive commands from PC (telnet or Python client) Include TCP server in GNU Radio (Python Module) Launch TCP server from GNU Radio (Python Snippet) with access to the callback functions Display on PC stacked spectra with broader bandwidth than the DVB-T 2.8 MHz bandwidth. 13 / 16.
(14) Preliminary investigations. Why a pulse and what properties are wanted ? 1. What is the spectrum of a Dirac function ? 2. What is the spectrum of a square function with period T ?. 1 2/1024. 3. What is the spectrum of a pulse with rise time τ and duration T ?. 64/1024 512/1024. x=z e r o s ( 1 0 2 4 , 1 ) ; x ( 1 : 6 4 ) =1; x =[ x ; x ; ; x ; ; x ; x ] ; x=x−mean ( x ) ; y= f f t s h i f t ( a b s ( f f t ( x ) ) ) ; p l o t ( f , y /max ( y ) ) x=z e r o s ( 1 0 2 4 , 1 ) ; x ( 1 : 5 1 2 ) =1; x =[ x ; x ; ; x ; ; x ; x ] ; x=x−mean ( x ) ; y= f f t s h i f t ( a b s ( f f t ( x ) ) ) ; p l o t ( f , y /max ( y ) ) x=z e r o s ( 1 0 2 4 , 1 ) ; f o r k =1:1024 i f mod ( k , 1 6 )<8 x ( k ) =1; end end x =[ x ; x ; ; x ; ; x ; x ] ; x=x−mean ( x ) ; y= f f t s h i f t ( a b s ( f f t ( x ) ) ) ; p l o t ( f , y /max ( y ) ). sin/1024. normalized spectrum (a.u.). x=z e r o s ( 1 0 2 4 , 1 ) ; x ( 1 : 2 ) =1; x =[ x ; x ; ; x ; ; x ; x ] ; x=x−mean ( x ) ; f=l i n s p a c e ( −1 ,1 , l e n g t h ( x ) ) ; y= f f t s h i f t ( a b s ( f f t ( x ) ) ) ; p l o t ( f , y /max ( y ) ). 16/32. 0.8. 4. What is the spectrum of a pulse with duration T gating a sine wave with frequency f , f 1/T ?. 0.6. 0.4. 0.2. 0 -1. -0.5. 0. 0.5. 1. normalized frequency (a.u.). x=s i n ( [ 0 : 1 0 2 3 ] / 1 0 2 4 ∗ 2 ∗ p i ) ’ ; x =[ x ; x ; ; x ; ; x ; x ] ; y= f f t s h i f t ( a b s ( f f t ( x ) ) ) ; 14 / 16.
(15) Conclusion & perspectives IA, ROBOTIQUE & SCIENCE. SDR. ANALYSE ET RÉALISATION D’UN. RADAR À BRUIT PAR RADIO LOGICIELLE FORK. M. E!. J.-M FRIEDT [FEMTO-ST, département temps-fréquence, Besançon, France] W. FENG [Xidian University, National Laboratory of Radar Signal Processing, Xi’an, Chine]. MOTS-CLÉS : RADAR, GNU/OCTAVE, TRAITEMENT DU SIGNAL. I Opportunity to deploy an embedded system for a practical application I Opportunity to learn how to properly use GNU/Linux targeted to an embedded environment (Buildroot – never compile on the target system) I Reproducible experiment: <50 euros (RPi4+DVB-T). P. Le traitement du signal, domaine abstrait par excellence, devient très amusant lors de sa mise en pratique. Nous nous proposons de démontrer expérimentalement un RADAR à bruit mis en œuvre par radio logicielle.. 20. GNU/Linux Magazine France N°240. our paraphraser l’introduction d’une vidéo de chanteurs de rap français [1], « on a 3 minutes, un appart’ rempli de bordel, une vieille émission pour les gosses dans l’ordi, on peut sûrement y aller au bluff ». Dans notre cas, nous n’avons pas 3 minutes, mais 5 semaines de confinement, on a bien un appartement rempli de bordel, et plutôt que l’émission de télévision, nous avons des antennes et des circuits de radio logicielle. Pouvons-nous mesurer la distance de la maison en face dudit appartement en réalisant un RADAR (RAdio Detection And Ranging) actif avec les moyens du bord (figure 1) ?. I Radiofrequency signal processing ... I for characterizing a (RF) microsystem. I RADAR range resolution: ∆R = c/(2B) ... I ... can be reached with many sources other than a pulse generator to achieve large B.. NOTE Cet article est le premier d’une série de trois articles sur le sujet.. https://www.gnulinuxmag.com. 15 / 16.
(16) References I C. Simmonds, Mastering Embedded Linux Programming, Packt (2015) I K. Yaghmour & al., Building Embedded Linux Systems: Concepts, Techniques, Tricks, and Traps, O’Reilly (2008) I P. Ficheux & É. Bénard, Linux embarqué, Eyrolles (2012) I P. Ficheux, Linux embarqué – Mise en place et développement, Eyrolles (2017) I P. Ficheux, Introduction à Buildroot, GNU/Linux Magazine France (Avril 2010) I M. Corbin, Buildroot for RISC-V, FOSDEM 2019 à https://archive.fosdem.org/2019/schedule/event/riscvbuildroot/ I Buildroot Git repository: https://git.busybox.net/buildroot/ I Experiment ... even without hardware: qemu emulating a Raspberry Pi 3/64 bits. 16 / 16.
(17)
Documents relatifs
TEX MACS provides a unified and user friendly framework for editing structured documents with different types of content such as text, mathematics, computer algebra sessions,
In the present work, a GNU radio framework is implemented to recreate an IoT network where IoT devices embedding MAB algorithms are able to learn the availability of the channels
GNU/Linux est le nom parfois donné à un système d’exploitation associant des éléments essentiels (shell, compilateurs, bibliothèques C, commandes, etc ...) du projet GNU (GNU’s
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des
Using an flexible orthog- onal frequency division multiplexing (OFDM) based im- plementation example, we describe the tool and show the performance of the transmission on a
Nous ferons l’hypothèse dans un premier temps d’un utilisateur désireux de recevoir des signaux radiofréquences avec un récepteur de télévision numérique terrestre
Second week: getting GNU Radio running on the target system (Raspberry Pi4) – demonstration with FM broadcast radio demodulation and sound transfer to the host used as sound card
ALSA4 utilities have been installed on the custom Buildroot configuration supporting GNU Radio: test sound with # speaker-test -t sine -f 440 My first GNU Radio flowchart running