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
960
ソフトウェアラジオと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
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
320
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
170
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
120
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
210
.NET 9 のパフォーマンス改善
nenonaninu
0
1k
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
100
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
270
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building an army of robots
kneath
302
44k
Thoughts on Productivity
jonyablonski
67
4.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
RailsConf 2023
tenderlove
29
940
Optimising Largest Contentful Paint
csswizardry
33
3k
What's in a price? How to price your products and services
michaelherold
243
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Designing for humans not robots
tammielis
250
25k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Agile that works and the tools we love
rasmusluckow
328
21k
Statistics for Hackers
jakevdp
796
220k
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