Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ソフトウェアラジオとC++ そしてFMエアチェックのための信号解析と数値計算にまつわるよもやま...
Search
Kenji Rikitake
November 22, 2019
Technology
0
950
ソフトウェアラジオとC++ そしてFMエアチェックのための信号解析と数値計算にまつわるよもやま話 / Software radio and C++
A presentation for Kichijoji.pm 20, Freakout Holdings, Inc., Minato-ku, Tokyo, Japan, 22-NOV-2019
Kenji Rikitake
November 22, 2019
Tweet
Share
More Decks by Kenji Rikitake
See All by Kenji Rikitake
SDR Implementation of Analog FM Broadcast Multipath Filter
jj1bdx
0
720
インターネットとオープンな無線技術の今後 / Future of Internet and Open Radio Engineering
jj1bdx
0
1.2k
FM放送とマルチパスを適応フィルタで極めてみた / Solving multipath distortion of FM broadcast by adaptive filters
jj1bdx
1
3.4k
SDR時代のFM受信 マルチパスモニタとマルチパスフィルタ / FM broadcast reception with SDR - multipath monitor and multipath filter
jj1bdx
0
560
How I discover a working implementation of clock_nanosleep() for macOS in CPAN Time::Hires
jj1bdx
1
1.1k
Sleeping pays / 1000eng-74th-jj1bdx
jj1bdx
1
42
The BEAM Programming Paradigm
jj1bdx
1
890
Safe randomness: theory and practice
jj1bdx
1
1.3k
ただの失業したインターネット屋は果たして独立開業できたのか? / Did the fired internet engineer finally start up his business successfully as an independent consultant?
jj1bdx
1
440
Other Decks in Technology
See All in Technology
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
170
AIのコンプラは何故しんどい?
shujisado
1
190
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
220
CustomCopを使ってMongoidのコーディングルールを整えてみた
jinoketani
0
220
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
520
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
170
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
24
11k
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
220
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
210
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
260
Featured
See All Featured
BBQ
matthewcrist
85
9.4k
Thoughts on Productivity
jonyablonski
67
4.4k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Done Done
chrislema
181
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Bash Introduction
62gerente
608
210k
Transcript
ιϑτΣΞϥδΦͱC++ 1 ͦͯ͠FMΤΞνΣοΫͷͨΊͷ৴߸ղੳͱܭࢉʹ·ͭΘΔΑ· 1 ͜ͷൃදͰͷC++C++11Ҏ߱ͷ༷Λલఏͱ͍ͯ͠·͢ɻ Kenji Rikitake / Kichijoji.pm 20
1
Kenji Rikitake Γ͖͚ͨ ͚Μ͡ ྗ ݈࣍ 22-NOV-2019 kichijoji.pm 20 Freakout
Holdings, Inc. Minato-ku, Tokyo, Japan @jj1bdx Kenji Rikitake / Kichijoji.pm 20 2
ٕज़࢜ʢใֶ෦ʣ ྗ݈ٕ࣍ज़࢜ࣄॴ ॴ ใॲཧ҆શ֬อࢧԉ࢜ ϖύϘݚڀॴ ٬һݚڀһ ୈҰڃ্ແઢٕज़࢜ ୈҰڃΞϚνϡΞແઢٕ࢜ ΞϚνϡΞແઢྺ 438ϲ݄
Cྺ 33ɺC++11ྺ ͨͬͨͷ3 ຊݚڀͷϖύϘݚڀॴͷ͝ࢧԉʹਂ͘ײँ͠·͢ Kenji Rikitake / Kichijoji.pm 20 3
Kenji Rikitake / Kichijoji.pm 20 4
1970ྲྀߦͬͨFMΤΞνΣοΫ FM์ૹԻָͷࢁͩͬͨ ࢲ͍ͬͺ͍ϥδΧη2ͰԻͯ͠·ͨ͠ ʢ2019ͷࠓͰԻ͍ͯ͠Δਓୡ͍ͬͺ͍͍·͢ʣ 2 Puding Jahodový, Public domain, h4ps:/
/commons.wikimedia.org/wiki/File:Sharp_5P-37G_wiki.jpg, via Wikimedia Commons Kenji Rikitake / Kichijoji.pm 20 5
Kenji Rikitake / Kichijoji.pm 20 6
21ੈلͷϥδΦιϑτΣΞ USBσόΠε3ͰपมͱଳҬ੍ݶ มͨ͠৴߸ ιϑτΣΞ Ͱॲཧ ίʔυ͕ॻ͚Ε͋ͳͨϥδΦ͕࡞ΕΔ! ΤΞνΣοΫͨ͠MP3ϑΝΠϧεϚϗͰฉ͖์! 3 Photo of
Airspy HF+ Dual Port by Kenji Rikitake Kenji Rikitake / Kichijoji.pm 20 7
पมͱଳҬ੍ݶͷྫ 82.5MHzΛத৺ͱ͢ΔFM์ૹͷ߹ 82.308MHz - 82.692MHz ↓ -0.192MHz - 0.192MHz ±192kHzͷ384kHz෯ͷ৴߸ʹม
Kenji Rikitake / Kichijoji.pm 20 8
ෛͷप ࣮ͷ৴߸: ࣮ࡍͷՄೳੑ(1): ࣮ࡍͷՄೳੑ(2): ཧ༝: …ͳͷͰ࣮ͷ৴߸͚ͩͰ৴߸ͷҐ૬ΛಛఆͰ͖·ͤΜ ෛͷपΛߟ͑ͯΔඞཁ͕͋Γ·͢ Kenji Rikitake /
Kichijoji.pm 20 9
IQ৴߸: ࣮৴߸Λෳૉʹม ࣮ͷ৴߸: ͔ΒҎԼͷ৴߸Λੜ͠·͢ ରԠ͢ΔIQ৴߸: ͨͩ͠ ʢͳͥ͜Ε͕ Ͱͳ͍͔ͱ͍͏ͱిؾͰ ిྲྀͷҙຯͳͷͰ͢ʣ ͜ΕΛॻ͖͢ͱ
ʢۃ࠲ඪʣ I৴߸ʢ࣮෦ʣ: Q৴߸ʢڏ෦ʣ: Kenji Rikitake / Kichijoji.pm 20 10
IQ৴߸ͩͱԿ͕͏Ε͍͔͠ IQ৴߸: std::complex<float> IQsample ͱͯ͠ఆٛ ৴߸ͷৼ෯ std::abs(IQsample) ৴߸ͷҐ૬
std::arg(IQsample) std::arg(z) = std::atan2(z.imag(), z.real()) AM์ૹͳΒ ͦͷͷɺFM์ૹͳΒ Λඍ͢Ε෮ௐͰ͖Δ Kenji Rikitake / Kichijoji.pm 20 11
50લͷFM์ૹ։͔࢝࣌Βͷ·͍͠: FMͷ ࣭Լ͛Δ Ϛϧνύε Kenji Rikitake / Kichijoji.pm 20 12
Ϛϧνύε ෳܦ࿏Λ௨Δిͷׯব ৼ෯Ґ૬͕มԽͯ͠Ή Ґ૬͕ΉͱFM์ૹͩͱͱͯෆշͳԻ͕͢Δ ैདྷͷରԠ: ΞϯςφͷࢦੑͷมԽ͙Β͍͔͠Ͱ͖ͳ͔ͬͨ Kenji Rikitake / Kichijoji.pm
20 13
ϚϧνύεͰຊདྷͳ͍৴߸͕ݟ͑Δྫ4 4 Lithium57, English transla3on: MichaelBillington, h:ps:/ /commons.wikimedia.org/wiki/ File:Mul3path_propaga3on_diagram_en.svg from
Wikimedia Commons, public domain Kenji Rikitake / Kichijoji.pm 20 14
ϚϧνύεʹΑΔৼ෯ͷมԽ5 5 Audacity simula.on and graphics by Kenji Rikitake Kenji
Rikitake / Kichijoji.pm 20 15
ϚϧνύεԆͷΈࠐΈ6 6 I, Cantalamessa, h.ps:/ /commons.wikimedia.org/wiki/File:Mul>path_impulse_response.png from Wikimedia Commons, licensed
CC BY 2.5 Kenji Rikitake / Kichijoji.pm 20 16
ԆΛϞσϦϯάͯ͠ٯԋࢉ͢Δ FM৴߸: ৼ෯ҰఆɺҐ૬/पͷΈมԽ ৼ෯ͷมԽ→৴߸͕ΜͰ͍Δ มԽͨ͠ৼ෯Λ͢Α͏ͳΈࠐΈΛड৴ଆ Ͱͬͯ͠·͑Α͍ ʢLeast Mean Square /
Constant Modulus Algorithmʣ Kenji Rikitake / Kichijoji.pm 20 17
ٯԋࢉͷͨΊͷFIRϑΟϧλ (airspy-fmradion) using IQSample = std::complex<float>; using IQSampleVector = std::vector<IQSample>;
inline IQSample MultipathFilter::single_process(const IQSample filter_input) { m_state.emplace_back(filter_input); m_state.erase(m_state.begin()); IQSample output = IQSample(0, 0); // for (unsigned int i = 0; i < m_filter_order; i++) { // output += m_state[i] * m_coeff[i]; // } volk_32fc_x2_dot_prod_32fc(&output, m_state.data(), m_coeff.data(), m_filter_order); return output; } Kenji Rikitake / Kichijoji.pm 20 18
Vector Op*mized Library of Kernels (VOLK) x86/ARMͷ৴߸ॲཧͷͨΊͷϥΠϒϥϦ SIMD໋ྩͰΧϦΧϦͷϋϯυνϡʔχϯά h"p:/ /libvolk.org/
ʢFM෮ௐઐ༻ͷ͕ؔ͋ͬͨΓ͢Δ͘Β͍ΨνͰ͢ʣ Kenji Rikitake / Kichijoji.pm 20 19
ྗͷGPLv3࣮ = airspy-fmradion h"ps:/ /github.com/jj1bdx/airspy-fmradion ͱͱSo#FMͱ͍͏FMड৴ઐ༻ػ ࠓதAM/FM/SSB/CWͳΜͰ͟͝ΕʹਐԽ ͓ͦΒ͘ੈքॳͷOSSͰ࣮ͨ͠ϚϧνύεϑΟϧλ macOSͱLinuxͱRaspberry PiͰಈ͖·͢
ʢGUIෆಘҙͳͷͰʣίϚϯυϥΠϯπʔϧ Ͱ͢ Kenji Rikitake / Kichijoji.pm 20 20
࠷ޙʹҰ۟ ౙͷʹ ཕΛ͑Δ ి ʢౙͷʹ֤Ͱൃੜ͢Δཕ͕ిΛհͯ͠த์ૹ3.9MHzʢ75mόϯυʣͷ์ૹͰຊதʹ͘·ͳ͘ΘΔ༷Λࣔͨ͠Ұ۟ɻͳ͓ɺཕʢΒ͍ʣຊདྷՆͷقޠɻʣ Kenji Rikitake / Kichijoji.pm 20
21
ܾҙද໌ 2020ʹ౦ژʹͬͨΒ ؤுͬͯͬͱՔ͍Ͱ ΑΓΑ͍ݚڀͱٕज़Ͱ ࣾձʹߩݙ͠·͢ Kenji Rikitake / Kichijoji.pm 20
22
Thank you Ques%ons? Kenji Rikitake / Kichijoji.pm 20 23