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
970
ソフトウェアラジオと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
740
インターネットとオープンな無線技術の今後 / 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
570
How I discover a working implementation of clock_nanosleep() for macOS in CPAN Time::Hires
jj1bdx
1
1.2k
Sleeping pays / 1000eng-74th-jj1bdx
jj1bdx
1
42
The BEAM Programming Paradigm
jj1bdx
1
900
Safe randomness: theory and practice
jj1bdx
1
1.4k
ただの失業したインターネット屋は果たして独立開業できたのか? / 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
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
180
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
470
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
460
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
690
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
160
生成AIのビジネス活用
seosoft
0
110
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
350
2024AWSで個人的にアツかったアップデート
nagisa53
1
110
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
500
comilioとCloudflare、そして未来へと向けて
oliver_diary
6
450
Building Scalable Backend Services with Firebase
wisdommatt
0
110
Featured
See All Featured
A better future with KSS
kneath
238
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
How to train your dragon (web standard)
notwaldorf
89
5.8k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Site-Speed That Sticks
csswizardry
3
270
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
How GitHub (no longer) Works
holman
312
140k
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