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
39
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
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
290
Terraform Stacks入門 #HashiTalks
msato
0
350
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
いざ、BSC討伐の旅
nikinusu
2
780
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
複雑なState管理からの脱却
sansantech
PRO
1
130
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
SSMRunbook作成の勘所_20241120
koichiotomo
1
110
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
220
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
570
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Designing Experiences People Love
moore
138
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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