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
940
ソフトウェアラジオと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
710
インターネットとオープンな無線技術の今後 / Future of Internet and Open Radio Engineering
jj1bdx
0
1.2k
FM放送とマルチパスを適応フィルタで極めてみた / Solving multipath distortion of FM broadcast by adaptive filters
jj1bdx
1
3.3k
SDR時代のFM受信 マルチパスモニタとマルチパスフィルタ / FM broadcast reception with SDR - multipath monitor and multipath filter
jj1bdx
0
540
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
40
The BEAM Programming Paradigm
jj1bdx
1
870
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
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
150
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
100
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
110
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
230
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Taming you application's environments
salaboy
0
200
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
190
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
We Have a Design System, Now What?
morganepeng
50
7.2k
Designing the Hi-DPI Web
ddemaree
280
34k
Become a Pro
speakerdeck
PRO
25
5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
What's in a price? How to price your products and services
michaelherold
243
12k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Music & Morning Musume
bryan
46
6.2k
4 Signs Your Business is Dying
shpigford
180
21k
Adopting Sorbet at Scale
ufuk
73
9.1k
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