Tuesday 26 September 2017

Gleitender Durchschnitt Gnuradio


In meinen letzten Versuchen, die Rauschzahl eines rtl-sdr-Dongles zu messen, bemerkte Ive, dass die Ergebnisse der zweimaligen Leistungsmethode und der Y-Faktormethode sich signifikant unterscheiden. In einem Versuch, den Grund für diesen Unterschied herauszufinden, habe ich einige weitere Messungen mit verschiedenen Arten von Signalen. Ich fand heraus, dass der Leistungsdetektor I implementiert in GNU Radio verhält sich seltsam. Es scheint, dass die angegebene Signalleistung von den Signalen Crestfaktor abhängt, was nicht der Fall sein sollte. Update: Wie meine Follow-up-Post erklärt, war ich mit einem falschen Setup sowohl auf dem Spektrum-Analysator und dem Signalgenerator. Zunächst möchte ich klarstellen, dass das, was Im hier zu tun ist, die angegebene Leistung (in relativen Einheiten) für zwei Signale identischer Leistung vergleicht. Ich versuche nicht, die absolute Kraft zu bestimmen (sagen wir in Milliwatt). Wie die GNU Radio FAQ kurz erklärt. Letztere ist mit typischen SDR-Geräten knifflig. Das Setup für diese Experimente ist ähnlich, was ich in meinem Beitrag über Rauschzahl beschrieben. Im mit einem Ezcap DVB-T Dongle abgestimmt auf 700,5 MHz. Im, der die Energie in einem 200 kHz Band misst, das um -500 kHz von der Mittenfrequenz versetzt ist. Soweit ich von der FFT sehen kann, ist diese Band frei von Sporen und anderen Artefakten des Empfängers selbst. Die Signalleistung wird gemessen, indem das Signal mit einer komplexen Konjugation von sich multipliziert wird und dann ein gleitender Durchschnitt von 50000 Proben genommen wird. Im unter Verwendung eines Rohde amp Schwarz SMBV-Vektorsignalgenerators, der in der Lage ist, eine beliebige Wellenform mit einer genauen Gesamtsignalleistung zu erzeugen. Als Kontrolle, Ive auch Setup ein FSV-Spektrum-Analysator zur Messung der Gesamtsignalleistung im gleichen 200 kHz-Band wie die rtl-sdr Setup. So zeigt z. B. ein Spektrumanalysator für eine unmodulierte Sinuswelle mit -95 dBm Pegel am Generator: Und das zeigt sich für ein 100 kHz-Band des Gaußschen Rauschens, wieder mit -95 dBm Pegel: Die gemessene Leistung Im 200 kHz Kanal stimmt in beiden Fällen gut mit der Leistungseinstellung am Generator überein. Der Unterschied besteht vermutlich aus Verlusten im Kabel (ich verwendete ein 60 cm langes verlustarmes LMR-195 Koax, das mit dem USRP kam), Anschlüsse, Fehler bei der Kalibrierung beider Geräte und die Tatsache, dass der FSV seine eigene Rauschleistung dem Signal hinzufügt . Wichtig ist jedoch, dass sich beim Einschalten der Modulation die Leistungsablesung nur um 0,19 dB ändert. Ich denke, das ist gut innerhalb der akzeptablen Messbereich. Wiederholen der gleichen beiden Messungen mit dem rtl-sdr-Dongle und dem GNU-Funk-Leistungsdetektor: Beachten Sie, dass nun das modulierte Signal eine viel höhere Leistung aufweist als das unmodulierte. Der Unterschied liegt bei 2,53 dB, was nicht auf Zufallsfehler zurückzuführen ist. Tatsächlich ist dieser Effekt wiederholbar und nicht spezifisch für den rtl-sdr-Dongle. Ive wiederholte die gleichen Messungen unter Verwendung eines USRP N200-Geräts mit einer SBX-Tochterplatine. Ive verwendete auch eine Anzahl von verschiedenen Signalen, vom bandbegrenzten Gaußschen Rauschen, von mehreren CW-Signalen zu einem amplitudenmodulierten Träger. Die Ergebnisse sind in der folgenden Tabelle zusammengefaßt. Um die Dinge klarer, Im zeigt die angegebene Leistung in Bezug auf die CW. Ive verwendet -95 dBm mittlere Leistung für rtl-sdr und -100 dBm für USRP, um das Signal-Rausch-Verhältnis ungefähr das gleiche auf beiden Geräten zu halten. Wie Sie sehen können, zeigen beide Geräte einen Offset für Signale, die einen signifikanten Unterschied zwischen Spitzen - und Durchschnittsleistungen aufweisen. Die Offsets sind auch sehr ähnlich zwischen den Geräten, etwas, was darauf hindeutet, dass dieser Effekt nicht durch das Gerät selbst verursacht wird. Jede Erläuterung aufgrund des physikalischen Empfängers, die ich mir vorstellen kann, führt zu einer niedrigeren Verstärkung für Signale mit einem hohen Spitzen-Mittelwert-Leistungsverhältnis. So genau das Gegenteil von dem, was ich gesehen habe. Es scheint nicht durch einige intelligente Logik in der Tuner-Anpassung Verstärkung für verschiedene Signale verursacht werden. Der Unterschied in der Verstärkung scheint bis zu sehr niedrigen Signalleistungen zu bleiben. Ich denke, es ist unwahrscheinlich, dass eine solche Optimierung bis zu einem sehr niedrigen Signal-zu-Rausch-Niveau funktionieren würde. Dies schließt auch jegliche Empfänger-Nichtlinearität als die Ursache aus, soweit ich das sagen kann. Wenn ich einen analogen Leistungsdetektor verwenden würde, wäre diese Art von Effekt typisch für einen Detektor, der die Signalleistung nicht direkt mißt (wie ein Diodendetektor, der eine exponentielle Eigenschaft anstelle von quadratischem aufweist). Allerdings Im Im Berechnung der Signalleistung numerisch und Sie können nicht eine genauere quadratische Funktion als x 2. Ich habe ein paar Theorien über numerische Fehler getestet. Tatsächlich unterscheiden sich die Ergebnisse etwas zwischen dem gleitenden Durchschnitt oder dem dezimierenden Tiefpassfilter. Sie unterscheiden sich auch zwischen der Verwendung von Konjugat - und Multiplikationsblöcken oder dem RMS-Block. Allerdings sind die Unterschiede unwesentlich, soweit ich sehen kann und nicht erklären, die Messungen. Ive gewählt das Flow Graph Setup oben gezeigt, weil es Zahlen, die am nächsten zu einer identischen Berechnung in NumPy getan sind produziert. Numerische Fehler erklären auch nicht, warum der gleiche Flußdiagramm gültige Ergebnisse für einen Empfänger erzeugt, der mit Signal - und Rauschquellenblöcken simuliert wird. So weit bin ich aus Ideen, was könnte dies verursachen. Geschrieben von Toma Kategorien: Analog Neuen Kommentar hinzufügengnuradio. gr: Filters gnuradio. gr. Ftfilterccc (int dezim. Std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex)) gt) gt Anz. Int nthreads 1) rarr grfftfiltercccsptr Schneller FFT-Filter mit grcomplexem Eingang, grcomplex-Ausgang und grcomplex-Anzapfungen. Grfftfiltercccsptr. Siedlungen (self. Std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) grfftfiltercccsptr. Taps (Selbst) rarr std :: vectorlt (grcomplex, std :: allocatorlt (grcomplex) gt) gt gnuradio. gr. Fftfilterfff (int Dezimation floatvektor taps int nthreads 1) rarr grfftfilterfffsptr Schnelles FFT-Filter mit Float-Eingang, Float-Ausgang und Float-Taps. Filter-Verzögerungs-Kombinationsblock. Der Block nimmt einen oder zwei Float-Stream und gibt einen komplexen Strom. Wenn nur ein Floatstrom eingegeben wird, ist der reale Ausgang eine verzögerte Version dieses Eingangs und der imaginäre Ausgang der gefilterte Ausgang. Wenn zwei Schwimmer mit dem Eingang verbunden sind, dann ist der reale Ausgang die verzögerte Version des ersten Eingangs, und der imaginäre Ausgang ist der gefilterte Ausgang. Die Verzögerung in dem realen Pfad berücksichtigt die Gruppenverzögerung, die durch den Filter im imaginären Pfad eingeführt wird. Die Filteranschlüsse müssen vor dem Initialisieren dieses Bausteins berechnet werden. Gnuradio. gr. FIR-Filter mit grcomplex-Eingang, grcomplex-Ausgang und grcomplex-Anzapfungen. Firfilterccc (int decimation. std :: vectorlt (grcomplex. Grfirfiltercccsptr. Siedlungen (self. Std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) grfirfiltercccsptr. Taps (Selbst) rarr std :: vectorlt (grcomplex, std :: allocatorlt (grcomplex) gt) gt gnuradio. gr. Firfilterccf (int dezimierung floatvector taps) rarr grfirfilterccfsptr FIR Filter mit grcomplex Eingang, grcomplex Ausgang und float taps. Grfirfilterccfsptr. Ansaugsysteme (Selbstschwimmerhähne) grfirfilterccfsptr. Taps (selbst) rarr floatvector gnuradio. gr. firfilterfcc (int Dezimierung. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Taps) rarr grfirfilterfccsptr FIR-Filter mit Schwimmereingang, grcomplex Ausgang und grcomplex Hähne. Grfirfilterfccsptr. Siedlungen (Selbststd: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) grfirfilterfccsptr. Taps (Selbst) rarr std :: vectorlt (grcomplex, std :: allocatorlt (grcomplex) gt) gt gnuradio. gr. Firfilterfff (int decimation floatvector taps) rarr grfirfilterfffsptr FIR-Filter mit Float-Eingang, Float-Ausgang und Float-Taps. FIR-Filter mit Float-Eingang, kurzem Ausgang und Schwimmern. Grfirfilterfsfsptr. Ansaugsysteme (Selbstschwimmern) grfirfilterfsfsptr. Taps (selbst) rarr floatvector gnuradio. gr. Firfilterscc (int dezim. Std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt taps) rarr grfirfiltersccsptr FIR-Filter mit kurzem Eingang, grcomplex-Ausgang und grcomplex-Anzapfungen. Grfirfiltersccsptr. Siedlungen (Selbststd: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) grfirfiltersccsptr. Taps (Selbst) rarr std :: vectorlt (grcomplex, std :: allocatorlt (grcomplex) gt) gt gnuradio. gr. Fractionalinterpolatorcc (float phaseshift, float interpratio) rarr grfractionalinterpolatorccsptr Interpolierender mmse-Filter mit grcomplexem Eingang, grcomplex-Ausgang. Grfractionalinterpolatorccsptr. Interpratio (selbst) rarr float grfractionalinterpolatorccsptr. Mu (selbst) rarr float grfractionalinterpolatorccsptr. Setinterpratio (selbst. Float interpratio) grfractionalinterpolatorccsptr. Setmu (Selbstschwimmer mu) gnuradio. gr. Fractionalinterpolatorff (float phaseshift. Float interpratio) rarr grfractionalinterpolatorffsptr Interpolation von mmse-Filtern mit Float-Eingang, Float-Ausgang. Grfractionalinterpolatorffsptr. Interpratio (selbst) rarr float grfractionalinterpolatorffsptr. Mu (selbst) rarr float grfractionalinterpolatorffsptr. Setinterpratio (selbst. Float interpratio) grfractionalinterpolatorffsptr. Setmu (Selbstschwimmer mu) gnuradio. gr. freqxlatingfirfilterccc (int Dezimierung. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Hähne. Doppel centerfreq. Doppel samplingfreq) rarr grfreqxlatingfirfiltercccsptr FIR-Filter mit Frequenzumsetzung kombiniert mit grcomplex Eingang, grcomplex Ausgang und grcomplex tippt Diese Klasse effizient Kombiniert eine Frequenzumsetzung (typischerweise eine Umwandlung von 8220 nach unten) mit einem FIR-Filter (typischerweise Tiefpaß) und Dezimierung. Es eignet sich ideal für ein 8220-Kanal-Auswahlfilter8221 und kann effizient verwendet werden, um ein Schmalband-Signal aus einem breiten Bandbreite-Eingang auszuwählen und zu dezimieren. Verwendet ein einzelnes Eingabefeld, um ein einzelnes Ausgabearray zu erzeugen. Zusätzliche Ein - und Ausgänge werden ignoriert. Konstruieren Sie ein FIR-Filter mit den angegebenen Taps und eine zusammengesetzte Frequenzübersetzung, die die Centerfreq auf Null Hz verschiebt. Die Frequenzumsetzung erfolgt logisch vor dem Filtervorgang. Grreinqxlatingfirfiltercccsptr. Setcenterfreq (selbst. Double centerfreq) grfreqxlatingfirfiltercccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. freqxlatingfirfilterccf (int Dezimierung. floatvector tippt. Doppel centerfreq. Doppel samplingfreq) rarr grfreqxlatingfirfilterccfsptr FIR-Filter mit Frequenzumsetzung kombiniert mit grcomplex Eingang, grcomplex Ausgang und Schwimmerhähne Diese Klasse effizient eine Frequenzumsetzung kombiniert (typischerweise 8220down conversion8221) mit einem FIR-Filter (in der Regel niedrig - Pass) und Dezimierung. Es eignet sich ideal für ein 8220-Kanal-Auswahlfilter8221 und kann effizient verwendet werden, um ein Schmalband-Signal aus einem breiten Bandbreite-Eingang auszuwählen und zu dezimieren. Verwendet ein einzelnes Eingabefeld, um ein einzelnes Ausgabearray zu erzeugen. Zusätzliche Ein - und Ausgänge werden ignoriert. Konstruieren Sie ein FIR-Filter mit den angegebenen Taps und eine zusammengesetzte Frequenzübersetzung, die die Centerfreq auf Null Hz verschiebt. Die Frequenzumsetzung erfolgt logisch vor dem Filtervorgang. Grfreqxlatingfirfilterccfsptr. Setcenterfreq (selbst. Double centerfreq) grfreqxlatingfirfilterccfsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. freqxlatingfirfilterfcc (int Dezimierung. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Hähne. Doppel centerfreq. Doppel samplingfreq) rarr grfreqxlatingfirfilterfccsptr FIR-Filter mit Frequenzumsetzung kombiniert mit float-Eingang, grcomplex Ausgang und grcomplex tippt Diese Klasse effizient Kombiniert eine Frequenzumsetzung (typischerweise eine Umwandlung von 8220 nach unten) mit einem FIR-Filter (typischerweise Tiefpaß) und Dezimierung. Es eignet sich ideal für ein 8220-Kanal-Auswahlfilter8221 und kann effizient verwendet werden, um ein Schmalband-Signal aus einem breiten Bandbreite-Eingang auszuwählen und zu dezimieren. Verwendet ein einzelnes Eingabefeld, um ein einzelnes Ausgabearray zu erzeugen. Zusätzliche Ein - und Ausgänge werden ignoriert. Konstruieren Sie ein FIR-Filter mit den angegebenen Taps und eine zusammengesetzte Frequenzübersetzung, die die Centerfreq auf Null Hz verschiebt. Die Frequenzumsetzung erfolgt logisch vor dem Filtervorgang. Grfreqxlatingfirfilterfccsptr. Setcenterfreq (selbst. Double centerfreq) grfreqxlatingfirfilterfccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. freqxlatingfirfilterfcf (int Dezimierung. floatvector tippt. Doppel centerfreq. Doppel samplingfreq) rarr grfreqxlatingfirfilterfcfsptr FIR-Filter mit Frequenzumsetzung kombiniert mit float-Eingang, grcomplex Ausgang und Schwimmerhähne Diese Klasse effizient eine Frequenzumsetzung kombiniert (typischerweise 8220down conversion8221) mit einem FIR-Filter (in der Regel niedrig - Pass) und Dezimierung. Es eignet sich ideal für ein 8220-Kanal-Auswahlfilter8221 und kann effizient verwendet werden, um ein Schmalband-Signal aus einem breiten Bandbreite-Eingang auszuwählen und zu dezimieren. Verwendet ein einzelnes Eingabefeld, um ein einzelnes Ausgabearray zu erzeugen. Zusätzliche Ein - und Ausgänge werden ignoriert. Konstruieren Sie ein FIR-Filter mit den angegebenen Taps und eine zusammengesetzte Frequenzübersetzung, die die Centerfreq auf Null Hz verschiebt. Die Frequenzumsetzung erfolgt logisch vor dem Filtervorgang. Grfreqxlatingfirfilterfcfsptr. Setcenterfreq (selbst. Double centerfreq) grfreqxlatingfirfilterfcfsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. freqxlatingfirfilterscc (int Dezimierung. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Hähne. Doppel centerfreq. Doppel samplingfreq) rarr grfreqxlatingfirfiltersccsptr FIR-Filter mit Frequenzumsetzung kombiniert mit kurzen Eingang, grcomplex Ausgang und grcomplex tippt Diese Klasse effizient Kombiniert eine Frequenzumsetzung (typischerweise eine Umwandlung von 8220 nach unten) mit einem FIR-Filter (typischerweise Tiefpaß) und Dezimierung. Es eignet sich ideal für ein 8220-Kanal-Auswahlfilter8221 und kann effizient verwendet werden, um ein Schmalband-Signal aus einem breiten Bandbreite-Eingang auszuwählen und zu dezimieren. Verwendet ein einzelnes Eingabefeld, um ein einzelnes Ausgabearray zu erzeugen. Zusätzliche Ein - und Ausgänge werden ignoriert. Konstruieren Sie ein FIR-Filter mit den angegebenen Taps und eine zusammengesetzte Frequenzübersetzung, die die Centerfreq auf Null Hz verschiebt. Die Frequenzumsetzung erfolgt logisch vor dem Filtervorgang. Grreinqxlatingfirfiltersccsptr. Setcenterfreq (selbst. Double centerfreq) grfreqxlatingfirfiltersccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. freqxlatingfirfilterscf (int Dezimierung. floatvector tippt. Doppel centerfreq. Doppel samplingfreq) rarr grfreqxlatingfirfilterscfsptr FIR-Filter mit Frequenzumsetzung kombiniert mit kurzen Eingang, grcomplex Ausgang und Schwimmerhähne Diese Klasse effizient eine Frequenzumsetzung kombiniert (typischerweise 8220down conversion8221) mit einem FIR-Filter (in der Regel niedrig - Pass) und Dezimierung. Es eignet sich ideal für ein 8220-Kanal-Auswahlfilter8221 und kann effizient verwendet werden, um ein Schmalband-Signal aus einem breiten Bandbreite-Eingang auszuwählen und zu dezimieren. Verwendet ein einzelnes Eingabefeld, um ein einzelnes Ausgabearray zu erzeugen. Zusätzliche Ein - und Ausgänge werden ignoriert. Konstruieren Sie ein FIR-Filter mit den angegebenen Taps und eine zusammengesetzte Frequenzübersetzung, die die Centerfreq auf Null Hz verschiebt. Die Frequenzumsetzung erfolgt logisch vor dem Filtervorgang. Grfreqxlatingfirfilterscfsptr. Setcenterfreq (selbst. Double centerfreq) grfreqxlatingfirfilterscfsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. Hilbertfc (unsigned int ntaps) rarr grhilbertfcsptr realer Ausgang wird entsprechend verzögert eingegeben. Imaginären Ausgang ist hilbert gefiltert (90 Grad Phasenverschiebung) Version des Eingangs. Gnuradio. gr. iirfilterffd (doublevector fftaps. doublevector fbtaps) rarr griirfilterffdsptr IIR-Filter mit Schwimmereingang, schweben Ausgang und Doppel Taps Dieser Filter verwendet die direkte Form I Implementierung, wo die Feedforward-Taps enthält, und die Feedback-Einsen. Die Eingabe und Ausgabe genügt einer Differenzgleichung der Form yn - sum ak yn - k sum bk xn - k mit der entsprechenden rationalen Systemfunktion. Beachten Sie, dass einige Texte die Systemfunktion mit einem im Nenner definieren. Wenn Sie diese Konvention verwenden, müssen Sie die Feedback-Taps negieren. Griirfilterffdsptr. Dict. cc Wörterbuch:: doublevector:: Deutsch - Englisch - Übersetzung. interpfirfilterccc (int Interpolation. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Taps) rarr grinterpfirfiltercccsptr Interpolier FIR-Filter mit grcomplex Eingang, grcomplex Ausgang und grcomplex Hähne. Grinterpfirfiltercccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. Interpfirfilterccf (int interpolation floatvector taps) rarr grinterpfirfilterccfsptr Interpolierende FIR-Filter mit grcomplex Eingang, grcomplex Ausgang und float taps. Grinterpfirfilterccfsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. interpfirfilterfcc (int Interpolation. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Taps) rarr grinterpfirfilterfccsptr Interpolier FIR-Filter mit Schwimmereingang, grcomplex Ausgang und grcomplex Hähne. Grinterpfirfilterfccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. Interpfirfilterfff (int interpolation floatvector taps) rarr grinterpfirfilterfffsptr Interpolierende FIR-Filter mit Float-Eingang, Float-Ausgang und Float-Taps. Grinterpfirfilterfffsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. Interpfirfilterfsf (int interpolation floatvector taps) rarr grinterpfirfilterfsfsptr Interpolierende FIR-Filter mit Float-Eingang, kurzem Ausgang und Float-Taps. Grinterpfirfilterfsfsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. interpfirfilterscc (int Interpolation. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Taps) rarr grinterpfirfiltersccsptr Interpolier FIR-Filter mit kurzen Eingang, grcomplex Ausgang und grcomplex Hähne. Grinterpfirfiltersccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. rationalresamplerbaseccc (int Interpolation. int Dezimierung. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Taps) rarr grrationalresamplerbasecccsptr Rational Resampling Mehrphasige FIR-Filter mit grcomplex Eingang, grcomplex Ausgang und grcomplex Hähne. Grrationalresamplerbasecccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. rationalresamplerbaseccf (int Interpolation. int Dezimierung. floatvector Taps) rarr grrationalresamplerbaseccfsptr Rational Resampling Mehrphasige FIR-Filter mit grcomplex Eingang, grcomplex Ausgang und Wasserhähne zu schweben. Grrationalresamplerbaseccfsptr. Siedlungen (Selbst - schwimmerarmaturen) gnuradio. gr. rationalresamplerbasefcc (int Interpolation. int Dezimierung. std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt Taps) rarr grrationalresamplerbasefccsptr Rational Resampling Mehrphasige FIR-Filter mit Schwimmereingang, grcomplex Ausgang und grcomplex Hähne. Grrationalresamplerbasefccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. Rationalresamplerbasefff (int interpolation int decimation floatvector taps) rarr grrationalresamplerbasefffsptr Rational Resampling Mehrphasen-FIR-Filter mit Float-Eingang, Float-Ausgang und Float-Taps. Grrationalresamplerbasefffsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. Rationalresamplerbasefsf (int interpolation int decimation floatvector taps) rarr grrationalresamplerbasefsfsptr Rational Resampling Mehrphasen-FIR-Filter mit Float-Eingang, kurzem Ausgang und Float-Taps. Grrationalresamplerbasefsfsptr. Siedlungen (Selbstschwimmern) gnuradio. gr. Rationalresamplerbasescc (int interpolation int dezimierung std :: vectorlt (grcomplex. std :: allocatorlt (grcomplex) gt) gt taps) rarr grrationalresamplerbasesccsptr Rational Resampling Mehrphasen-FIR-Filter mit kurzem Eingang, grcomplexem Ausgang und grcomplex-Anzapfungen. Grrationalresamplerbasesccsptr. Siedlungen (selbst std :: vectorlt (grcomplex. Std :: allocatorlt (grcomplex) gt) gt taps) gnuradio. gr. Singlepoleiirfiltercc (double alpha unsigned int vlen 1) rarr grsinglepoleiirfilterccsptr einpoliges IIR-Filter mit komplexem Eingang, komplexer Ausgang Die Eingabe und Ausgabe erfüllen eine Differenzgleichung der Form yn - (1-alpha) yn-1 alpha xn mit dem entsprechenden rationalen System Funktion Beachten Sie, dass einige Texte die Systemfunktion mit einem im Nenner definieren. Wenn Sie diese Konvention verwenden, müssen Sie den Feedback-Hahn negieren. Grsinglepoleiirfilterccsptr. Siedlungen (self. Double alpha) gnuradio. gr. Singlepoleiirfilterff (double alpha unsigned int vlen 1) rarr grsinglepoleiirfilterffsptr einpoliges IIR-Filter mit Float-Eingang, Float-Ausgang Input und Output erfüllen eine Differenzgleichung der Form yn - (1-alpha) yn-1 alpha xn mit dem entsprechenden rationalen System Funktion Beachten Sie, dass einige Texte die Systemfunktion mit einem im Nenner definieren. Wenn Sie diese Konvention verwenden, müssen Sie den Feedback-Hahn negieren. Grsinglepoleiirfilterffsptr. Siedlungen (self. Double alpha) gnuradio. gr. Rarr grmovingaverageccsptr output ist die Bewegungssumme der letzten N Abtastwerte, skaliert durch den Skalenfaktor maxiter beschränkt, wie lange wir ohne Spülen des Akkumulators gehen Dies ist notwendig, um numerische Instabilität für Float und zu vermeiden Komplex. Grmovingaverageccsptr. Länge (Selbst-) rarr int grmovingaverageccsptr. (Selbst) rarr grcomplex grmovingaverageccsptr. Setlengthandscale (selbst int länge grcomplex scale) gnuradio. gr. Rarr grmovingaverageffsptr output ist die Bewegungssumme der letzten N Abtastwerte, skaliert durch den Skalenfaktor maxiter begrenzt, wie lange wir gehen, ohne den Akkumulator zu spülen Dies ist notwendig, um numerische Instabilität für Float und zu vermeiden Komplex. Ausgang ist die Bewegungssumme der letzten N Abtastwerte, skaliert durch den Skalenfaktor maxiter begrenzt, wie lange wir gehen, ohne den Akkumulator zu spülen Dies ist notwendig, um numerische Instabilität für Float und komplexe zu vermeiden. Ausgang ist die Bewegungssumme der letzten N Abtastwerte, skaliert durch den Skalenfaktor maxiter begrenzt, wie lange wir gehen, ohne den Akkumulator zu spülen Dies ist notwendig, um numerische Instabilität für Float und komplexe zu vermeiden. Grmovingaveragesssptr. Länge (Selbst) rarr int grmovingaveragesssptr. Maßstab (selbst) rarr short grmovingaveragesssptr. Setlengthandscale (int. Länge, kurze Skala) gnuradio. gr. Pfbarbresamplerccf (floatvector taps. Unsigned int filterize 32) rarr grpfbarbresamplerccfsptr Polyphasenfilterbank beliebiger Resampler mit grcomplex Eingang, grcomplex Ausgang und float taps. Dieser Block nimmt einen Signalstrom auf und führt eine beliebige Neuabtastung durch. Die Wiederabtastrate kann jede reelle Zahl sein. Die Neuabtastung wird durch Konstruieren von Filtern durchgeführt, wobei die Interpolationsrate ist. Wir berechnen dann wo. Mit und. Können wir eine rationale Wiederabtastung durchführen, wobei eine rationale Zahl nahe der Eingangsrate liegt, wo wir Filter haben, und wir durchlaufen sie als eine Polyphasenfilterbank mit einem Schritt, so daß. Um die willkürliche Rate zu erhalten, wollen wir zwischen zwei Punkten interpolieren. Für jeden Wert out nehmen wir einen Ausgang aus dem aktuellen Filter. Und den nächsten Filter und dann linear interpolieren zwischen den beiden auf der Grundlage der realen Neuabtastrate, die wir wollen. Die lineare Interpolation liefert uns nur eine Annäherung an die angegebene reale Abtastrate. Der Fehler ist ein Quantisierungsfehler zwischen den beiden Filtern, die wir als Interpolationspunkte verwendet haben. Zu diesem Zweck die Anzahl der Filter. Bestimmt den Quantisierungsfehler um so größer. Je kleiner der Lärm. Sie können für ein bestimmtes Rauschniveau entwerfen, indem Sie die Filtergröße (Parameter) einstellen. Die Größe defaults zu 32 Filtern, die ungefähr so ​​gut ist, wie die meisten Implementierungen Notwendigkeit. Der Trick mit dem Entwerfen dieses Filters ist, wie man die Hähne des Prototypfilters spezifiziert. Wie der PFB-Interpolator werden die Taps unter Verwendung der interpolierten Filterrate spezifiziert. In diesem Fall ist diese Rate die Eingangsabtastrate multipliziert mit der Anzahl der Filter in der Filterbank, die auch die Interpolationsrate ist. Alle anderen Werte sollten relativ zu dieser Rate sein. Zum Beispiel, für einen 32-Filter beliebigen Resampler und mit dem GNU Radio8217s firdes Dienstprogramm, um den Filter zu bauen, bauen wir ein Tiefpassfilter mit einer Abtastrate von. Eine 3-dB-Bandbreite und eine Übergangsbandbreite von. Wir können auch die zu verwendende Out-of-Band-Dämpfung angeben. Und die Filter-Fenster-Funktion (ein Blackman-Harris-Fenster in diesem Fall). Der erste Eingang ist die Verstärkung des Filters, die wir hier als Interpolationsrate () angeben. Die Theorie hinter diesem Block finden Sie in Kapitel 7.5 des folgenden Buches. Erstellen Sie die polyphase filterbank arbitray resampler. Drucken Sie alle Filterbank-Taps auf dem Bildschirm. Grpfbarbresamplerccfsptr. Setrate (Eigenschwimmer) gnuradio. gr. Pfbchannelizerccf (unsigned int numchans floatvektor taps float oversamplerate 1) rarr grpfbchannelizerccfsptr Mehrphasenfilterbank-Kanalisierer mit grcomplex Eingang, grcomplex Ausgang und float taps. Dieser Baustein nimmt komplexe Eingaben auf und kanalisiert ihn auf Kanäle gleicher Bandbreite. Jeder der resultierenden Kanäle wird auf die neue Rate dezimiert, die die Eingangsabtastrate dividiert durch die Anzahl der Kanäle ist. Der PFB-Kanalisierungscode nimmt die oben erzeugten Taps und baut einen Satz von Filtern auf. Das Set enthält die Anzahl der Filter und jedes Filter enthält ceil (taps. size () decim) Anzahl der Taps. Jeder Abgriff aus dem Filterprototyp wird nacheinander in den nächsten Filter eingefügt. Wenn alle Eingangsabgriffe verwendet werden, werden die verbleibenden Filter in der Filterbank mit 08217s ausgefüllt, um sicherzustellen, dass jeder Filter die gleiche Anzahl von Anzapfungen aufweist. Jedes Filter arbeitet unter Verwendung der grfir Filterklassen von GNU Radio, die den Eingangsstrom an nimmt und die innere Produktberechnung ausführt, wo die Anzahl der Filterabgriffe liegt. Um dies effizient in der GNU-Radio-Struktur zu bewältigen, muß jeder Filtereingang aus seinem eigenen Eingangsstrom kommen. Daher muss der Kanalisierer mit Streams versehen sein, in denen der Eingangsstrom entschachtelt wurde. Dies geschieht am einfachsten mit dem grstreamtostreams-Block. Die Ausgabe wird dann als Vektor erzeugt, wobei der Index in dem Vektor der nächste Abtastwert aus dem dritten Kanal ist. Dies wird am einfachsten gehandhabt, indem die Ausgabe an einen Grvectortostreams-Block gesendet wird, um die Konvertierung und die Weitergabe von Datenströmen auszuführen. Die Eingabe - und Ausgabeformatierung erfolgt über einen hierblock2 mit dem Namen pfbchannelizerccf. Dies kann in einem einzigen Stream und gibt Ströme basierend auf dem oben beschriebenen Verhalten. Die Filter des Filter8217s sollten auf der Eingangsabtastrate basieren. Zum Beispiel, mit dem GNU Radio8217s firdes Dienstprogramm zum Bau von Filtern, bauen wir ein Tiefpassfilter mit einer Abtastrate von. Eine 3-dB-Bandbreite und eine Übergangsbandbreite von. Wir können auch die zu verwendende Out-of-Band-Dämpfung angeben. Und die Filter-Fenster-Funktion (ein Blackman-Harris-Fenster in diesem Fall). Die erste Eingabe ist die Verstärkung des Filters, die wir hier als Einheit angeben. Der Filterausgang kann auch übersteuert werden. Die Überabtastrate ist das Verhältnis der tatsächlichen Ausgangsabtastrate zur normalen Ausgangsabtastrate. Sie muss rational mit der Anzahl von Kanälen verknüpft sein, wie Ni für i in 1, N, die eine Abtastrate von fsN, fs ergibt, wobei fs die Eingangsabtastrate und N die Anzahl der Kanäle ist. Beispielsweise beträgt für 6 Kanäle mit fs 6000 Hz die normale Rate 60006 1000 Hz. Die zulässigen Überabtastraten betragen 66, 65, 64, 63, 62 und 61, wobei die Ausgangsabtastrate eines 61 Oversample-Verhältnisses 6000 Hz oder 6-fache der normalen 1000 Hz beträgt. Eine Rate von 65 1,2, so dass die Ausgangsleistung 1200 Hz betragen würde. Die Theorie hinter diesem Block finden Sie in Kapitel 6 des folgenden Buches. Bauen Sie den Polyphasenfilterbank-Dezimator auf. Beispielsweise beträgt für 6 Kanäle mit fs 6000 Hz die normale Rate 60006 1000 Hz. Die zulässigen Überabtastraten betragen 66, 65, 64, 63, 62 und 61, wobei die Ausgangsabtastrate eines 61 Oversample-Verhältnisses 6000 Hz oder 6-fache der normalen 1000 Hz beträgt. Setzt die Filtertabellen filterbank8217s mit dem neuen Prototypfilter gnuradio. gr zurück. Pfbclocksyncccf (double sps float loopbw floatvektor taps unsigned int filterize 32. float initphase 0. float maxratedeviation 1.5 int osps 1) rarr grpfbclocksyncccfsptr Zeitsynchronizer mit Hilfe von Polyphasenfilterbanken. Dieser Block führt eine Zeitsynchronisation für PAM-Signale durch, indem die Ableitung des gefilterten Signals minimiert wird, was wiederum das SNR maximiert und ISI minimiert. Dieser Ansatz arbeitet durch das Einrichten von zwei Filterbänken, wobei eine Filterbank das signalgestützte Pulsforming-Filter (wie ein Wurzel-Cosinus-Filter) enthält, wobei jeder Zweig der Filterbank eine andere Phase des Filters enthält. Die zweite Filterbank enthält die Ableitungen der Filter in der ersten Filterbank. Denken Sie dies im Zeitbereich, enthält die erste Filterbank Filter, die eine sinc Form zu ihnen haben. Wir wollen das zu analysierende Ausgangssignal genau an der Spitze der Sinusform ausrichten. Die Ableitung des sinc enthält eine Null am Maximalpunkt von sinc (sinc (0) 1, sinc (0) 8217 0). Weiterhin ist der Bereich um den Nullpunkt relativ linear. Wir nutzen diese Tatsache, um das Fehlersignal zu erzeugen. Wenn das Signal aus den Ableitungsfiltern für das i-te Filter din ist und das Ausgangssignal des angepassten Filters xin ist, berechnen wir den Fehler als: en (Re Re Im Im) 2.0 Diese Gleichung misst den Fehler im Real - und Imaginärteil . Es gibt zwei Gründe, die wir mit dem Signal selbst multiplizieren. Zuerst, wenn das Symbol positiv oder negativ sein könnte, aber wir wollen, dass der Fehlerausdruck immer sagt, dass wir in die gleiche Richtung gehen, je nachdem, auf welcher Seite des Nullpunktes wir sind. Das Vorzeichen von xin passt den Fehlerterm an, um dies zu tun. Zweitens skaliert die Größe von xin den Fehlerterm in Abhängigkeit von der Amplitude des Symbols8217s, so dass größere Signale uns einen stärkeren Fehlerterm geben, weil wir mehr Vertrauen in diesen Symbolwert haben. Das Verwenden der Größe von xin anstelle von nur dem Vorzeichen ist besonders gut für Signale mit niedrigem SNR. Das Fehlersignal, en, gibt uns einen Wert proportional zu, wie weit weg von dem Nullpunkt sind wir in der Ableitung Signal. Wir wollen diesen Wert auf Null setzen, also richten wir eine Schleife zweiter Ordnung ein. Wir haben zwei Variablen für diese Schleife dk ist die Filterzahl in der Filterbank, die wir eingeschaltet sind, und drate ist die Rate, die wir durch die Filter im stationären Zustand fahren. Das heißt, aufgrund der natürlichen Taktdifferenzen zwischen dem Sender und dem Empfänger stellt drate die Differenz dar und würde die Filterphasenpfade durchlaufen, um den Empfänger gesperrt zu halten. Wenn man dies als PLL zweiter Ordnung betrachtet, ist der Drat die Frequenz und dk die Phase. So aktualisieren wir drate und dk unter Verwendung der Standardschleifengleichungen, die auf zwei Fehlersignalen, dalpha und dbeta basieren. Wir haben diese beiden Werte für ein kritisch gedämpftes System aufeinander abgestimmt, also bitten wir im Blockkonstruktor um 8220gain, 8221, die dalpha ist, während dbeta gleich (gain2) 4 ist. Die Parameter block8217s sind: Bauen Sie den Synchronizer für die Synchronisation der Polyphasenfilterbank auf. Gibt die Schleifenverstärkung alpha zurück. Gibt die Schleifenverstärkung beta zurück. Grpfbclocksyncccfsptr. getchanneltaps ( self . int channel ) rarr floatvector Returns the taps of the matched filter for a particular channel Returns the current clock rate. grpfbclocksyncccfsptr. getdampingfactor ( self ) rarr float Returns the loop damping factor. grpfbclocksyncccfsptr. getdiffchanneltaps ( self . int channel ) rarr floatvector Returns the taps in the derivative filter for a particular channel grpfbclocksyncccfsptr. getdifftaps ( self ) rarr dummy5 Returns all of the taps of the derivative filter grpfbclocksyncccfsptr. getdifftapsasstring ( self ) rarr string Return the derivative filter taps as a formatted string for printing grpfbclocksyncccfsptr. getloopbandwidth ( self ) rarr float Returns the loop bandwidth. Returns all of the taps of the matched filter grpfbclocksyncccfsptr. gettapsasstring ( self ) rarr string Return the taps as a formatted string for printing Set the loop gain alpha. Set8217s the loop filter8217s alpha gain parameter. This value should really only be set by adjusting the loop bandwidth and damping factor. Set the loop gain beta. Set8217s the loop filter8217s beta gain parameter. This value should really only be set by adjusting the loop bandwidth and damping factor. Set the loop damping factor. Set the loop filter8217s damping factor to. The damping factor should be sqrt(2)2.0 for critically damped systems. Set it to anything else only if you know what you are doing. It must be a number between 0 and 1. When a new damping factor is set, the gains, alpha and beta, of the loop are recalculated by a call to updategains(). Set the loop bandwidth. Set the loop filter8217s bandwidth to. This should be between 2pi200 and 2pi100 (in radssamp). It must also be a positive number. When a new damping factor is set, the gains, alpha and beta, of the loop are recalculated by a call to updategains(). Set the maximum deviation from 0 drate can have grpfbclocksyncccfsptr. settaps ( self . floatvector taps . dummy5 ourtaps . std::vectorlt(p. grfirccf . std::allocatorlt(p. grfirccf)gt)gt ourfilter ) Resets the filterbank8217s filter taps with the new prototype filter gnuradio. gr. pfbclocksyncfff ( double sps . float gain . floatvector taps . unsigned int filtersize 32 . float initphase 0 . float maxratedeviation 1.5 ) rarr grpfbclocksyncfffsptr Timing synchronizer using polyphase filterbanks. This block performs timing synchronization for PAM signals by minimizing the derivative of the filtered signal, which in turn maximizes the SNR and minimizes ISI. This approach works by setting up two filterbanks one filterbank contains the signal8217s pulse shaping matched filter (such as a root raised cosine filter), where each branch of the filterbank contains a different phase of the filter. The second filterbank contains the derivatives of the filters in the first filterbank. Thinking of this in the time domain, the first filterbank contains filters that have a sinc shape to them. We want to align the output signal to be sampled at exactly the peak of the sinc shape. The derivative of the sinc contains a zero at the maximum point of the sinc (sinc(0) 1, sinc(0)8217 0). Furthermore, the region around the zero point is relatively linear. We make use of this fact to generate the error signal. If the signal out of the derivative filters is din for the ith filter, and the output of the matched filter is xin, we calculate the error as: en (Re Re Im Im ) 2.0 This equation averages the error in the real and imaginary parts. There are two reasons we multiply by the signal itself. First, if the symbol could be positive or negative going, but we want the error term to always tell us to go in the same direction depending on which side of the zero point we are on. The sign of xin adjusts the error term to do this. Second, the magnitude of xin scales the error term depending on the symbol8217s amplitude, so larger signals give us a stronger error term because we have more confidence in that symbol8217s value. Using the magnitude of xin instead of just the sign is especially good for signals with low SNR. The error signal, en, gives us a value proportional to how far away from the zero point we are in the derivative signal. We want to drive this value to zero, so we set up a second order loop. We have two variables for this loop dk is the filter number in the filterbank we are on and drate is the rate which we travel through the filters in the steady state. That is, due to the natural clock differences between the transmitter and receiver, drate represents that difference and would traverse the filter phase paths to keep the receiver locked. Thinking of this as a second-order PLL, the drate is the frequency and dk is the phase. So we update drate and dk using the standard loop equations based on two error signals, dalpha and dbeta. We have these two values set based on each other for a critically damped system, so in the block constructor, we just ask for 8220gain,8221 which is dalpha while dbeta is equal to (gain2)4. The block8217s parameters are: Build the polyphase filterbank timing synchronizer. grpfbclocksyncfffsptr. channeltaps ( self . int channel ) rarr floatvector Returns the taps of the matched filter grpfbclocksyncfffsptr. diffchanneltaps ( self . int channel ) rarr floatvector Returns the taps in the derivative filter Print all of the filterbank taps of the derivative filter to screen. Print all of the filterbank taps to screen. Set the gain value alpha for the control loop Set the gain value beta for the control loop Set the maximum deviation from 0 drate can have grpfbclocksyncfffsptr. settaps ( self . floatvector taps . dummy5 ourtaps . std::vectorlt(p. grfirfff . std::allocatorlt(p. grfirfff)gt)gt ourfilter ) Resets the filterbank8217s filter taps with the new prototype filter gnuradio. gr. pfbdecimatorccf ( unsigned int decim . floatvector taps . unsigned int channel ) rarr grpfbdecimatorccfsptr Polyphase filterbank bandpass decimator with grcomplex input, grcomplex output and float taps. This block takes in a signal stream and performs interger down - sampling (decimation) with a polyphase filterbank. The first input is the integer specifying how much to decimate by. The second input is a vector (Python list) of floating-point taps of the prototype filter. The third input specifies the channel to extract. By default, the zeroth channel is used, which is the baseband channel (first Nyquist zone). The parameter specifies which channel to use since this class is capable of bandpass decimation. Given a complex input stream at a sampling rate of and a decimation rate of. the input frequency domain is split into channels that represent the Nyquist zones. Using the polyphase filterbank, we can select any one of these channels to decimate. The output signal will be the basebanded and decimated signal from that channel. This concept is very similar to the PFB channelizer (see grpfbchannelizerccf) where only a single channel is extracted at a time. The filter8217s taps should be based on the sampling rate before decimation. For example, using the GNU Radio8217s firdes utility to building filters, we build a low-pass filter with a sampling rate of. a 3-dB bandwidth of and a transition bandwidth of. We can also specify the out-of-band attenuation to use. and the filter window function (a Blackman-harris window in this case). The first input is the gain of the filter, which we specify here as unity. The PFB decimator code takes the taps generated above and builds a set of filters. The set contains number of filters and each filter contains ceil(taps. size()decim) number of taps. Each tap from the filter prototype is sequentially inserted into the next filter. When all of the input taps are used, the remaining filters in the filterbank are filled out with 08217s to make sure each filter has the same number of taps. The theory behind this block can be found in Chapter 6 of the following book. Build the polyphase filterbank decimator. Resets the filterbank8217s filter taps with the new prototype filter gnuradio. gr. pfbinterpolatorccf ( unsigned int interp . floatvector taps ) rarr grpfbinterpolatorccfsptr Polyphase filterbank interpolator with grcomplex input, grcomplex output and float taps. This block takes in a signal stream and performs interger up - sampling (interpolation) with a polyphase filterbank. The first input is the integer specifying how much to interpolate by. The second input is a vector (Python list) of floating-point taps of the prototype filter. The filter8217s taps should be based on the interpolation rate specified. That is, the bandwidth specified is relative to the bandwidth after interpolation. For example, using the GNU Radio8217s firdes utility to building filters, we build a low-pass filter with a sampling rate of. a 3-dB bandwidth of and a transition bandwidth of. We can also specify the out-of-band attenuation to use, ATT, and the filter window function (a Blackman-harris window in this case). The first input is the gain, which is also specified as the interpolation rate so that the output levels are the same as the input (this creates an overall increase in power). The PFB interpolator code takes the taps generated above and builds a set of filters. The set contains number of filters and each filter contains ceil(taps. size()interp) number of taps. Each tap from the filter prototype is sequentially inserted into the next filter. When all of the input taps are used, the remaining filters in the filterbank are filled out with 08217s to make sure each filter has the same number of taps. The theory behind this block can be found in Chapter 7.1 of the following book. Build the polyphase filterbank interpolator. Print all of the filterbank taps to screen. Resets the filterbank8217s filter taps with the new prototype filterHow to integrate a specific number of vectors element-wise in gnuradio Dear Gnuradio enthusiasts, Short version: Does someone have a good approach to average a specific (but large) number of vectors together element-wise with the exactly same relative weight Say I want the two vectors 1,2,3,3 and 1,2,3,4 coming one after another giving the output 1,2,3,3.5 - is there any block available that does this and if so: how (In reality I will have many more vectors and elements though). Long version: I39m building an application for radio astronomy using Gnuradio and the USRP. I think I have hit a point where I have to write my own custom blocks for gnuradio to accomplish what I want, but before I dive into that I want to ask you as well if you have already solved this current problem of mine. I have tried to google this extensively and gotten closer and closer but without finding exactly what I need. I have played with the Gnuradio-companion and find it very helpful. I have some python experience but not much C, hence my hesitation to dive into the custom block writing before I made sure no-one has already solved this. The grand plan is as follows: 1) Use an USRP to recieve a signal, I know how. 2) Divide the stream of samples into vectors, I know how. 3) Take the FFT of the vectors one by one, I know how. 4) Average the vectors coming from the FFT together element-wise. I don39t know how. 5) Save the averaged vector to a file, I know how. What I cannot solve is step 4: I need to take the N vectors (each of size M) coming from the FFT-block and sum them together element-wise to produce one vector of size M. I found Jonathan Corgans interesting reply to a similar question on quotHow to integrate a vector signalquot at lists. gnu. orgarchivehtmldiscuss-gnuradio2007-04msg00146.html where Jonathan advises to use the gr. singlepoleiirfilterxx block with a parameter 0ltalpha lt1. It seems to me that such an approach works well if one wants to average quota couplequot of vectors, and also if you want to apply weights to the averaging. But, if I want to average Exactly say 1027 vectors together with Exactly the same weight to all of them, it seems to me that I cannot use the singlepoleiirfilter. Am I mistaken At least I have not managed to make it do what I want. Perhaps this is the solution and I39m just confused by the signal processing language which I39m not used to yet (I have a more theoretical physicsmath background). I found Jonathan Corgans entries from 2006 on vector addition in Gnuradio, lists. gnu. orgarchivehtmlpatch-gnuradio2006-06msg00002.html and I can use the adder in Gnuradio companion. So, in principle I could split my vectors in N streams, convert each stream to a vector again, feed them to a vector adder with N inputs and then get the output I want. But it seems suboptimal to have to deal with this splitting step to N inputs. I just want to add the vectors element-wise. I found the simplera package which claims to do things for radio astronomy very similar to what I want to do (cgran. orgwikisimpleraProjectDescription ). But, the unfortunately I have not found any extensive documentation of the code and I have not yet managed to understand if I can extract a solution to my problem from there. To use part of the simplera package functionality as a black-box is unfortunately no option since I have similar projects in mind if I solve this one, but they would not be related to radio astronomy. Hence my question: Does someone have a good approach to average a specific (but large) number of vectors together element-wise with the exactly same relative weight Say I want the two vectors 1,2,3,3 and 1,2,3,4 coming one after another giving the output 1,2,3,3.5 - is there any block available that does this and if so: how Best regards, Eskil Varenius On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I dont know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: 49 721 608-43790 Fax: 49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association Open this post in threaded view Report Content as Inappropriate Re: How to integrate a specific number of vectors element-wise in gnuradio In reply to this post by Eskil Varenius Dear Gnuradio enthusiasts, Short version: Does someone have a good approach to average a specific (but large) number of vectors together element-wise with the exactly same relative weight Say I want the two vectors 1,2,3,3 and 1,2,3,4 coming one after another giving the output 1,2,3,3.5 - is there any block available that does this and if so: how (In reality I will have many more vectors and elements though). Long version: Im building an application for radio astronomy using Gnuradio and the USRP. I think I have hit a point where I have to write my own custom blocks for gnuradio to accomplish what I want, but before I dive into that I want to ask you as well if you have already solved this current problem of mine. I have tried to google this extensively and gotten closer and closer but without finding exactly what I need. I have played with the Gnuradio-companion and find it very helpful. I have some python experience but not much C, hence my hesitation to dive into the custom block writing before I made sure no-one has already solved this. The grand plan is as follows: 1) Use an USRP to recieve a signal, I know how. 2) Divide the stream of samples into vectors, I know how. 3) Take the FFT of the vectors one by one, I know how. 4) Average the vectors coming from the FFT together element-wise. I dont know how. 5) Save the averaged vector to a file, I know how. What I cannot solve is step 4: I need to take the N vectors (each of size M) coming from the FFT-block and sum them together element-wise to produce one vector of size M. I found Jonathan Corgans interesting reply to a similar question on How to integrate a vector signal at lists. gnu. orgarchivehtmldiscuss-gnuradio2007-04msg00146.html where Jonathan advises to use the gr. singlepoleiirfilterxx block with a parameter 0ltalpha lt1. It seems to me that such an approach works well if one wants to average a couple of vectors, and also if you want to apply weights to the averaging. But, if I want to average Exactly say 1027 vectors together with Exactly the same weight to all of them, it seems to me that I cannot use the singlepoleiirfilter. Am I mistaken At least I have not managed to make it do what I want. Perhaps this is the solution and Im just confused by the signal processing language which Im not used to yet (I have a more theoretical physicsmath background). I found Jonathan Corgans entries from 2006 on vector addition in Gnuradio, lists. gnu. orgarchivehtmlpatch-gnuradio2006-06msg00002.html and I can use the adder in Gnuradio companion. So, in principle I could split my vectors in N streams, convert each stream to a vector again, feed them to a vector adder with N inputs and then get the output I want. But it seems suboptimal to have to deal with this splitting step to N inputs. I just want to add the vectors element-wise. I found the simplera package which claims to do things for radio astronomy very similar to what I want to do (cgran. orgwikisimpleraProjectDescription ). But, the unfortunately I have not found any extensive documentation of the code and I have not yet managed to understand if I can extract a solution to my problem from there. To use part of the simplera package functionality as a black-box is unfortunately no option since I have similar projects in mind if I solve this one, but they would not be related to radio astronomy. Hence my question: Does someone have a good approach to average a specific (but large) number of vectors together element-wise with the exactly same relative weight Say I want the two vectors 1,2,3,3 and 1,2,3,4 coming one after another giving the output 1,2,3,3.5 - is there any block available that does this and if so: how Best regards, Eskil Varenius Im curious as to why, in radio astronomy, you need to be able to control the number of FFTs you average together. Since nature isnt nearly so exacting as, for example, telecommunications, in that regard. The code in simplera is produced by a. grc flow-graph. The. grc flow-graph is shipped with the code, and such flow-graphs are very-nearly self-documenting. Theres also a README that comes with it. Since I maintain simplera as a very-much part-time time, and I have a handful of other applications I supportmaintain, and Im the maintainerauthor of build-gnuradio, I havent had time to write more extensive documentation. In reply to this post by Martin Braun (CEL) Hi everyone, After a long break since June I am now back learning about Gnuradio. I asked in June for a way to average vectors elementwise and Martin Braun suggested the movingaverageVff block in the gr-specest. He also said it would be available PyBOMBS. Now update: Since I had installed Gnuradio using the build-script I wanted to re-install it using pybombs. I uninstalled the old gnuradio by doing a quotsudo make uninstallquot in each build directory for the old release. Seems to work. Now I installed gnuradio 3.6 (since gr-specest is still only verified for 3.6, although I39m happy to see people working towards a 3.7 release). I did the install using the instructions on the pybombs quickstart page: git clone git:githubpybombspybombs cd pybombs git checkout gr-3.6.pybombs install gnuradio Gnuradio seemed to install without problems but: I realised I had path-problems since I could not start anything (gnuradio companion, import gnuradio etc. fails). Perhaps this was related to me using a custom target directory (optgnuradiopybombs). I looked around and found path instructions for custom directory installs at quotgnuradio. orgredmineprojectsgnuradiowikiUbuntuInstallInstalling-in-a-custom-directory quot, i. e. put the following in my. bashrc: GNU Radio installation export PATHPATH:optgnuradiopybombsbin export LDLIBRARYPATHLDLIBRARYPATH:optgnuradiopybombslib export PKGCONFIGPATHPKGCONFIGPATH:optgnuradiopybombslibpkgconfig export PYTHONPATHPYTHONPATH:optgnuradiopybombslibpython2.6site-packages However, that didn39t work completely - I still could not find the gnuradio python module. I realised two things: the 2.6 should probably be 2.7 for me, and also the pythonpath should end in dist-packages, not site-packages, since the site-packages folder was empty. After modifying the pythonpath with 2.7 and dist-packages everything runs, I can import gnuradio and also use gnuradio companion. So far so good Now for gr-specest. I tried to install it using app store (cool stuff, you guys are amazing) and also just command line which is equivalent, i. e. I run using quotsudo. pybombs install gr-specestquot I get a lot of output, but the perhaps most interesting one before it ends abruptly is: -- checking for module 39gruel39 -- package 39gruel39 not found -- Could NOT find GRUEL (missing: GRUELLIBRARIES GRUELINCLUDEDIRS) -- checking for module 39gnuradio-core39 -- package 39gnuradio-core39 not found -- Could NOT find GNURADIOCORE (missing: GNURADIOCORELIBRARIES GNURADIOCOREINCLUDEDIRS) CMake Error at CMakeLists. txt:100 (message): Gruel required to compile specest I am lost here. Any ideas I can give the rest of the output as well, but this is the showstopper as far as I can see. I have tried googling this, but it seems to me that the solution used is to use the build-gnuradio script instead of PyBOMBS. I could do that, but then I would not be able to enjoy installing gr-specest through the app-store ). Grateful for any advice. On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I don39t know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: lta hrefquottel:2B492072120608-43790quot valuequot4972160843790quotgt49 721 608-43790 Fax: lta hrefquottel:2B492072120608-46071quot valuequot4972160846071quotgt49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association I updated gr-specest so it would compile with 3.7, see my repo on githubdfxx if you want to try that route. The changes were almost all namespace stuff and cmake stuff, i. e. I don39t think I broke anything. On Oct 4, 2013 7:33 AM, quotEskil Vareniusquot lthidden email gt wrote: Hi everyone, After a long break since June I am now back learning about Gnuradio. I asked in June for a way to average vectors elementwise and Martin Braun suggested the movingaverageVff block in the gr-specest. He also said it would be available PyBOMBS. Now update: Since I had installed Gnuradio using the build-script I wanted to re-install it using pybombs. I uninstalled the old gnuradio by doing a quotsudo make uninstallquot in each build directory for the old release. Seems to work. Now I installed gnuradio 3.6 (since gr-specest is still only verified for 3.6, although I39m happy to see people working towards a 3.7 release). I did the install using the instructions on the pybombs quickstart page: git clone git:githubpybombspybombs cd pybombs git checkout gr-3.6.pybombs install gnuradio Gnuradio seemed to install without problems but: I realised I had path-problems since I could not start anything (gnuradio companion, import gnuradio etc. fails). Perhaps this was related to me using a custom target directory (optgnuradiopybombs). I looked around and found path instructions for custom directory installs at quotgnuradio. orgredmineprojectsgnuradiowikiUbuntuInstallInstalling-in-a-custom-directory quot, i. e. put the following in my. bashrc: GNU Radio installation export PATHPATH:optgnuradiopybombsbin export LDLIBRARYPATHLDLIBRARYPATH:optgnuradiopybombslib export PKGCONFIGPATHPKGCONFIGPATH:optgnuradiopybombslibpkgconfig export PYTHONPATHPYTHONPATH:optgnuradiopybombslibpython2.6site-packages However, that didn39t work completely - I still could not find the gnuradio python module. I realised two things: the 2.6 should probably be 2.7 for me, and also the pythonpath should end in dist-packages, not site-packages, since the site-packages folder was empty. After modifying the pythonpath with 2.7 and dist-packages everything runs, I can import gnuradio and also use gnuradio companion. So far so good Now for gr-specest. I tried to install it using app store (cool stuff, you guys are amazing) and also just command line which is equivalent, i. e. I run using quotsudo. pybombs install gr-specestquot I get a lot of output, but the perhaps most interesting one before it ends abruptly is: -- checking for module 39gruel39 -- package 39gruel39 not found -- Could NOT find GRUEL (missing: GRUELLIBRARIES GRUELINCLUDEDIRS) -- checking for module 39gnuradio-core39 -- package 39gnuradio-core39 not found -- Could NOT find GNURADIOCORE (missing: GNURADIOCORELIBRARIES GNURADIOCOREINCLUDEDIRS) CMake Error at CMakeLists. txt:100 (message): Gruel required to compile specest I am lost here. Any ideas I can give the rest of the output as well, but this is the showstopper as far as I can see. I have tried googling this, but it seems to me that the solution used is to use the build-gnuradio script instead of PyBOMBS. I could do that, but then I would not be able to enjoy installing gr-specest through the app-store ). Grateful for any advice. On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I don39t know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: lta hrefquottel:2B492072120608-43790quot valuequot4972160843790quot targetquotblankquotgt49 721 608-43790 Fax: lta hrefquottel:2B492072120608-46071quot valuequot4972160846071quot targetquotblankquotgt49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association Thanks for the link, sounds interesting. I will wait a few days to see if someone has ideas on the PyBOMBS issues I experience. Else I will try gr 3.7 and your specest version. I updated gr-specest so it would compile with 3.7, see my repo on githubdfxx if you want to try that route. The changes were almost all namespace stuff and cmake stuff, i. e. I don39t think I broke anything. On Oct 4, 2013 7:33 AM, quotEskil Vareniusquot lthidden email gt wrote: Hi everyone, After a long break since June I am now back learning about Gnuradio. I asked in June for a way to average vectors elementwise and Martin Braun suggested the movingaverageVff block in the gr-specest. He also said it would be available PyBOMBS. Now update: Since I had installed Gnuradio using the build-script I wanted to re-install it using pybombs. I uninstalled the old gnuradio by doing a quotsudo make uninstallquot in each build directory for the old release. Seems to work. Now I installed gnuradio 3.6 (since gr-specest is still only verified for 3.6, although I39m happy to see people working towards a 3.7 release). I did the install using the instructions on the pybombs quickstart page: git clone git:githubpybombspybombs cd pybombs git checkout gr-3.6.pybombs install gnuradio Gnuradio seemed to install without problems but: I realised I had path-problems since I could not start anything (gnuradio companion, import gnuradio etc. fails). Perhaps this was related to me using a custom target directory (optgnuradiopybombs). I looked around and found path instructions for custom directory installs at quotgnuradio. orgredmineprojectsgnuradiowikiUbuntuInstallInstalling-in-a-custom-directory quot, i. e. put the following in my. bashrc: GNU Radio installation export PATHPATH:optgnuradiopybombsbin export LDLIBRARYPATHLDLIBRARYPATH:optgnuradiopybombslib export PKGCONFIGPATHPKGCONFIGPATH:optgnuradiopybombslibpkgconfig export PYTHONPATHPYTHONPATH:optgnuradiopybombslibpython2.6site-packages However, that didn39t work completely - I still could not find the gnuradio python module. I realised two things: the 2.6 should probably be 2.7 for me, and also the pythonpath should end in dist-packages, not site-packages, since the site-packages folder was empty. After modifying the pythonpath with 2.7 and dist-packages everything runs, I can import gnuradio and also use gnuradio companion. So far so good Now for gr-specest. I tried to install it using app store (cool stuff, you guys are amazing) and also just command line which is equivalent, i. e. I run using quotsudo. pybombs install gr-specestquot I get a lot of output, but the perhaps most interesting one before it ends abruptly is: -- checking for module 39gruel39 -- package 39gruel39 not found -- Could NOT find GRUEL (missing: GRUELLIBRARIES GRUELINCLUDEDIRS) -- checking for module 39gnuradio-core39 -- package 39gnuradio-core39 not found -- Could NOT find GNURADIOCORE (missing: GNURADIOCORELIBRARIES GNURADIOCOREINCLUDEDIRS) CMake Error at CMakeLists. txt:100 (message): Gruel required to compile specest I am lost here. Any ideas I can give the rest of the output as well, but this is the showstopper as far as I can see. I have tried googling this, but it seems to me that the solution used is to use the build-gnuradio script instead of PyBOMBS. I could do that, but then I would not be able to enjoy installing gr-specest through the app-store ). Grateful for any advice. On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I don39t know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: lta hrefquottel:2B492072120608-43790quot valuequot4972160843790quot targetquotblankquotgt49 721 608-43790 Fax: lta hrefquottel:2B492072120608-46071quot valuequot4972160846071quot targetquotblankquotgt49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association I uninstalled what I had installed through PyBOMBS and installed Gnuradio 3.7 through the buildgnuradio script. Then I tried Jareds repo for specest with 3.7 (githubdfxx ) and it seems to compile just fine, well done I can also import specest in python without problems. Now: I would very much like to use the block movingaveragevff in Gnuradio Companion. Unfortunately it seems there are no xml files for that block, hence invisible to the GRC. I got a hint from Martin Braun that I could use the quotgrmodtool makexmlquot command to generate this. Unfortunately it seems that I don39t understand how to use it: ------------------------ grspecestjared ls apps AUTHORS build cmake CMakeLists. txt COPYING docs examples grc include lib python README swig grspecestjared grmodtool makexml movingaveragevff GNU Radio module name identified: specest Warning: This is an experimental feature. Don39t expect any magic. Searching for matching files in lib: None found. ------------------------- There is a file called movingaveragevff. cc in the lib directory, so I guess something more is needed here which I don39t know about. I tried looking at the page gnuradio. orgredmineprojectsgnuradiowikiOutOfTreeModulesversion16Making-your-blocks-available-in-GRC where there are links to example xml blocks to understand a bit more, but it seems these links are broken. Also the link to the grblock documentation in the next section (There39s more. ) is broken. I39m grateful for any hints on how to make the block movingaveragevff visible in the GRC. I updated gr-specest so it would compile with 3.7, see my repo on githubdfxx if you want to try that route. The changes were almost all namespace stuff and cmake stuff, i. e. I don39t think I broke anything. On Oct 4, 2013 7:33 AM, quotEskil Vareniusquot lthidden email gt wrote: Hi everyone, After a long break since June I am now back learning about Gnuradio. I asked in June for a way to average vectors elementwise and Martin Braun suggested the movingaverageVff block in the gr-specest. He also said it would be available PyBOMBS. Now update: Since I had installed Gnuradio using the build-script I wanted to re-install it using pybombs. I uninstalled the old gnuradio by doing a quotsudo make uninstallquot in each build directory for the old release. Seems to work. Now I installed gnuradio 3.6 (since gr-specest is still only verified for 3.6, although I39m happy to see people working towards a 3.7 release). I did the install using the instructions on the pybombs quickstart page: git clone git:githubpybombspybombs cd pybombs git checkout gr-3.6.pybombs install gnuradio Gnuradio seemed to install without problems but: I realised I had path-problems since I could not start anything (gnuradio companion, import gnuradio etc. fails). Perhaps this was related to me using a custom target directory (optgnuradiopybombs). I looked around and found path instructions for custom directory installs at quotgnuradio. orgredmineprojectsgnuradiowikiUbuntuInstallInstalling-in-a-custom-directory quot, i. e. put the following in my. bashrc: GNU Radio installation export PATHPATH:optgnuradiopybombsbin export LDLIBRARYPATHLDLIBRARYPATH:optgnuradiopybombslib export PKGCONFIGPATHPKGCONFIGPATH:optgnuradiopybombslibpkgconfig export PYTHONPATHPYTHONPATH:optgnuradiopybombslibpython2.6site-packages However, that didn39t work completely - I still could not find the gnuradio python module. I realised two things: the 2.6 should probably be 2.7 for me, and also the pythonpath should end in dist-packages, not site-packages, since the site-packages folder was empty. After modifying the pythonpath with 2.7 and dist-packages everything runs, I can import gnuradio and also use gnuradio companion. So far so good Now for gr-specest. I tried to install it using app store (cool stuff, you guys are amazing) and also just command line which is equivalent, i. e. I run using quotsudo. pybombs install gr-specestquot I get a lot of output, but the perhaps most interesting one before it ends abruptly is: -- checking for module 39gruel39 -- package 39gruel39 not found -- Could NOT find GRUEL (missing: GRUELLIBRARIES GRUELINCLUDEDIRS) -- checking for module 39gnuradio-core39 -- package 39gnuradio-core39 not found -- Could NOT find GNURADIOCORE (missing: GNURADIOCORELIBRARIES GNURADIOCOREINCLUDEDIRS) CMake Error at CMakeLists. txt:100 (message): Gruel required to compile specest I am lost here. Any ideas I can give the rest of the output as well, but this is the showstopper as far as I can see. I have tried googling this, but it seems to me that the solution used is to use the build-gnuradio script instead of PyBOMBS. I could do that, but then I would not be able to enjoy installing gr-specest through the app-store ). Grateful for any advice. On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I don39t know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: lta hrefquottel:2B492072120608-43790quot valuequot4972160843790quot targetquotblankquotgt49 721 608-43790 Fax: lta hrefquottel:2B492072120608-46071quot valuequot4972160846071quot targetquotblankquotgt49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association I39ve been poking around in other GRC files to find examples. The ones in specest are a little tough around the edges, but I39ve found the ones in GNURadiogr-fft and other sub blocks of GNURadio to be decent examples. Rgrep has been helpful. On Oct 8, 2013 1:26 AM, quotEskil Vareniusquot lthidden email gt wrote: I uninstalled what I had installed through PyBOMBS and installed Gnuradio 3.7 through the buildgnuradio script. Then I tried Jareds repo for specest with 3.7 (githubdfxx ) and it seems to compile just fine, well done I can also import specest in python without problems. Now: I would very much like to use the block movingaveragevff in Gnuradio Companion. Unfortunately it seems there are no xml files for that block, hence invisible to the GRC. I got a hint from Martin Braun that I could use the quotgrmodtool makexmlquot command to generate this. Unfortunately it seems that I don39t understand how to use it: ------------------------ grspecestjared ls apps AUTHORS build cmake CMakeLists. txt COPYING docs examples grc include lib python README swig grspecestjared grmodtool makexml movingaveragevff GNU Radio module name identified: specest Warning: This is an experimental feature. Don39t expect any magic. Searching for matching files in lib: None found. ------------------------- There is a file called movingaveragevff. cc in the lib directory, so I guess something more is needed here which I don39t know about. I tried looking at the page gnuradio. orgredmineprojectsgnuradiowikiOutOfTreeModulesversion16Making-your-blocks-available-in-GRC where there are links to example xml blocks to understand a bit more, but it seems these links are broken. Also the link to the grblock documentation in the next section (There39s more. ) is broken. I39m grateful for any hints on how to make the block movingaveragevff visible in the GRC. I updated gr-specest so it would compile with 3.7, see my repo on githubdfxx if you want to try that route. The changes were almost all namespace stuff and cmake stuff, i. e. I don39t think I broke anything. On Oct 4, 2013 7:33 AM, quotEskil Vareniusquot lthidden email gt wrote: Hi everyone, After a long break since June I am now back learning about Gnuradio. I asked in June for a way to average vectors elementwise and Martin Braun suggested the movingaverageVff block in the gr-specest. He also said it would be available PyBOMBS. Now update: Since I had installed Gnuradio using the build-script I wanted to re-install it using pybombs. I uninstalled the old gnuradio by doing a quotsudo make uninstallquot in each build directory for the old release. Seems to work. Now I installed gnuradio 3.6 (since gr-specest is still only verified for 3.6, although I39m happy to see people working towards a 3.7 release). I did the install using the instructions on the pybombs quickstart page: git clone git:githubpybombspybombs cd pybombs git checkout gr-3.6.pybombs install gnuradio Gnuradio seemed to install without problems but: I realised I had path-problems since I could not start anything (gnuradio companion, import gnuradio etc. fails). Perhaps this was related to me using a custom target directory (optgnuradiopybombs). I looked around and found path instructions for custom directory installs at quotgnuradio. orgredmineprojectsgnuradiowikiUbuntuInstallInstalling-in-a-custom-directory quot, i. e. put the following in my. bashrc: GNU Radio installation export PATHPATH:optgnuradiopybombsbin export LDLIBRARYPATHLDLIBRARYPATH:optgnuradiopybombslib export PKGCONFIGPATHPKGCONFIGPATH:optgnuradiopybombslibpkgconfig export PYTHONPATHPYTHONPATH:optgnuradiopybombslibpython2.6site-packages However, that didn39t work completely - I still could not find the gnuradio python module. I realised two things: the 2.6 should probably be 2.7 for me, and also the pythonpath should end in dist-packages, not site-packages, since the site-packages folder was empty. After modifying the pythonpath with 2.7 and dist-packages everything runs, I can import gnuradio and also use gnuradio companion. So far so good Now for gr-specest. I tried to install it using app store (cool stuff, you guys are amazing) and also just command line which is equivalent, i. e. I run using quotsudo. pybombs install gr-specestquot I get a lot of output, but the perhaps most interesting one before it ends abruptly is: -- checking for module 39gruel39 -- package 39gruel39 not found -- Could NOT find GRUEL (missing: GRUELLIBRARIES GRUELINCLUDEDIRS) -- checking for module 39gnuradio-core39 -- package 39gnuradio-core39 not found -- Could NOT find GNURADIOCORE (missing: GNURADIOCORELIBRARIES GNURADIOCOREINCLUDEDIRS) CMake Error at CMakeLists. txt:100 (message): Gruel required to compile specest I am lost here. Any ideas I can give the rest of the output as well, but this is the showstopper as far as I can see. I have tried googling this, but it seems to me that the solution used is to use the build-gnuradio script instead of PyBOMBS. I could do that, but then I would not be able to enjoy installing gr-specest through the app-store ). Grateful for any advice. On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I don39t know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: lta hrefquottel:2B492072120608-43790quot valuequot4972160843790quot targetquotblankquotgt49 721 608-43790 Fax: lta hrefquottel:2B492072120608-46071quot valuequot4972160846071quot targetquotblankquotgt49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association Thanks for the ideas, I could do that and Rgrep seems useful indeed. However, I39m new to coding Gnuradio and would like to use the tools provided as far as possible, i. e. I would very much like to use the grmodtool to help me with creating the xml files. But, after some investigations it seems the grmodtool cannot be used in this case since there is no quotimplquot file for the movingaveragevff. cc. This raises a few basic questions which I39ve tried to answer reading e. g. the coding guide at gnuradio. orgredmineprojectsgnuradiowikiCodingguideimpl and gnuradio. orgredmineprojectsgnuradiowikiBlocksCodingGuideImplementation-Source-File. But these instructions are I feel a bit over my head at the moment since I39m new to the block coding, so instead I have three more basic questions which I hope someone could help me with: 1) What is the relation between cc files in the lib directory with and without the impl suffix 2) Does the file movingaveragevff. cc need to be converted into a impl. cc file before I can use this block with gnuradio companion, or can I go ahead and write an XML file for the current block files 3) Where should I start reading if I want to learn how to convert the block movingaveragevff to something that can be recognized by the grmodtool makexml I39m sorry if these questions are stupid or the wrong forum, but I39m very grateful for all ideas and pointers to get me on the right track. If there39s a better place to ask these things, please let me know. I39ve been poking around in other GRC files to find examples. The ones in specest are a little tough around the edges, but I39ve found the ones in GNURadiogr-fft and other sub blocks of GNURadio to be decent examples. Rgrep has been helpful. On Oct 8, 2013 1:26 AM, quotEskil Vareniusquot lthidden email gt wrote: I uninstalled what I had installed through PyBOMBS and installed Gnuradio 3.7 through the buildgnuradio script. Then I tried Jareds repo for specest with 3.7 (githubdfxx ) and it seems to compile just fine, well done I can also import specest in python without problems. Now: I would very much like to use the block movingaveragevff in Gnuradio Companion. Unfortunately it seems there are no xml files for that block, hence invisible to the GRC. I got a hint from Martin Braun that I could use the quotgrmodtool makexmlquot command to generate this. Unfortunately it seems that I don39t understand how to use it: ------------------------ grspecestjared ls apps AUTHORS build cmake CMakeLists. txt COPYING docs examples grc include lib python README swig grspecestjared grmodtool makexml movingaveragevff GNU Radio module name identified: specest Warning: This is an experimental feature. Don39t expect any magic. Searching for matching files in lib: None found. ------------------------- There is a file called movingaveragevff. cc in the lib directory, so I guess something more is needed here which I don39t know about. I tried looking at the page gnuradio. orgredmineprojectsgnuradiowikiOutOfTreeModulesversion16Making-your-blocks-available-in-GRC where there are links to example xml blocks to understand a bit more, but it seems these links are broken. Also the link to the grblock documentation in the next section (There39s more. ) is broken. I39m grateful for any hints on how to make the block movingaveragevff visible in the GRC. I updated gr-specest so it would compile with 3.7, see my repo on githubdfxx if you want to try that route. The changes were almost all namespace stuff and cmake stuff, i. e. I don39t think I broke anything. On Oct 4, 2013 7:33 AM, quotEskil Vareniusquot lthidden email gt wrote: Hi everyone, After a long break since June I am now back learning about Gnuradio. I asked in June for a way to average vectors elementwise and Martin Braun suggested the movingaverageVff block in the gr-specest. He also said it would be available PyBOMBS. Now update: Since I had installed Gnuradio using the build-script I wanted to re-install it using pybombs. I uninstalled the old gnuradio by doing a quotsudo make uninstallquot in each build directory for the old release. Seems to work. Now I installed gnuradio 3.6 (since gr-specest is still only verified for 3.6, although I39m happy to see people working towards a 3.7 release). I did the install using the instructions on the pybombs quickstart page: git clone git:githubpybombspybombs cd pybombs git checkout gr-3.6.pybombs install gnuradio Gnuradio seemed to install without problems but: I realised I had path-problems since I could not start anything (gnuradio companion, import gnuradio etc. fails). Perhaps this was related to me using a custom target directory (optgnuradiopybombs). I looked around and found path instructions for custom directory installs at quotgnuradio. orgredmineprojectsgnuradiowikiUbuntuInstallInstalling-in-a-custom-directory quot, i. e. put the following in my. bashrc: GNU Radio installation export PATHPATH:optgnuradiopybombsbin export LDLIBRARYPATHLDLIBRARYPATH:optgnuradiopybombslib export PKGCONFIGPATHPKGCONFIGPATH:optgnuradiopybombslibpkgconfig export PYTHONPATHPYTHONPATH:optgnuradiopybombslibpython2.6site-packages However, that didn39t work completely - I still could not find the gnuradio python module. I realised two things: the 2.6 should probably be 2.7 for me, and also the pythonpath should end in dist-packages, not site-packages, since the site-packages folder was empty. After modifying the pythonpath with 2.7 and dist-packages everything runs, I can import gnuradio and also use gnuradio companion. So far so good Now for gr-specest. I tried to install it using app store (cool stuff, you guys are amazing) and also just command line which is equivalent, i. e. I run using quotsudo. pybombs install gr-specestquot I get a lot of output, but the perhaps most interesting one before it ends abruptly is: -- checking for module 39gruel39 -- package 39gruel39 not found -- Could NOT find GRUEL (missing: GRUELLIBRARIES GRUELINCLUDEDIRS) -- checking for module 39gnuradio-core39 -- package 39gnuradio-core39 not found -- Could NOT find GNURADIOCORE (missing: GNURADIOCORELIBRARIES GNURADIOCOREINCLUDEDIRS) CMake Error at CMakeLists. txt:100 (message): Gruel required to compile specest I am lost here. Any ideas I can give the rest of the output as well, but this is the showstopper as far as I can see. I have tried googling this, but it seems to me that the solution used is to use the build-gnuradio script instead of PyBOMBS. I could do that, but then I would not be able to enjoy installing gr-specest through the app-store ). Grateful for any advice. On Mon, Jun 24, 2013 at 02:09:51PM 0200, Eskil Varenius wrote: gt The grand plan is as follows: gt 1) Use an USRP to recieve a signal, I know how. gt 2) Divide the stream of samples into vectors, I know how. gt 3) Take the FFT of the vectors one by one, I know how. gt 4) Average the vectors coming from the FFT together element-wise. I don39t know gt how. gt 5) Save the averaged vector to a file, I know how. gt gt What I cannot solve is step 4: I need to take the N vectors (each of size M) gt coming from the FFT-block and sum them together element-wise to produce one gt vector of size M. The spectral estimation toolbox (gr-specest) has a block to do this (movingaveragevff). You can get it through PyBOMBS, it is not yet 3.7-compatible, though. -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstrae 12 Building 05.01 76131 Karlsruhe Phone: lta hrefquottel:2B492072120608-43790quot valuequot4972160843790quot targetquotblankquotgt49 721 608-43790 Fax: lta hrefquottel:2B492072120608-46071quot valuequot4972160846071quot targetquotblankquotgt49 721 608-46071 cel. kit. edu KIT -- University of the State of Baden-Wrttemberg and National Laboratory of the Helmholtz Association

No comments:

Post a Comment