当前位置:网站首页>Sonic communication - streaming data processing - window alignment
Sonic communication - streaming data processing - window alignment
2022-06-29 07:55:00 【qazw9600】
Problem description
- The principle of the acoustic communication program currently implemented by the individual is : It is expressed by two sound waves of different frequencies 0 and 1, According to the binary code of the data to be transmitted, a sound wave is generated for playing , The audio receiver uses the fast Fourier algorithm to analyze the collected audio data , The binary data is restored by analyzing the arrangement order of two specific frequencies .
- problem : Audio frequency is not a sample The audio can be parsed out , Use the fast Fourier algorithm to analyze , Multiple required sample Audio data can represent a frequency , Suppose every 40 individual sample Represents a frequency ( It's a binary bit 0 or 1), The audio receiver also needs to use the same sample Number as a parsing window , Because the time of sending and receiving is not necessarily synchronized , There will be a problem of window alignment , as follows :
* Suppose the sending data is 0 and 1 alternate , The window is 4 individual sample Audio data for
The sender :000011110000111100001111000011110000111
The receiver :0000111100001111....
May be : 000111100001111....
It could be :00111100001111....
It could be : 0111100001111....
- Pictured above , If the receiving and parsing end also follows 4 individual sample Parse , When the window is not aligned ,4 individual sample It will be mixed in 0 and 1, The parsed data may be wrong , Or it's all a mess of data .
Problem solving
- The solution given by the old employees of the company before is : Create multiple parsing processes , Each process is separated by a certain time , In this way, there is always a completely correct analysis .
- After a certain period of thinking , There's a better way .
advantage
- When determining the frequency of audio data in a window , The fast Fourier operation value for judging two specific frequencies can be used , Which high is considered to be which frequency , In this case, the window does not need to be fully aligned , As long as the correct frequency in the window exceeds another frequency , That's right sample Data accounts for more than 50% Can parse out the correct data , as follows :
* If the data is 0
Received audio sample data :0000 ( Can correctly parse )
0001( Can correctly parse )
0011( Can't parse correctly )
Real scene
- Above , As long as the parsing window is not exactly half the length of the sending window, there will be no error , The probability of this situation is also relatively small , In this case , In theory, the correct answer can be found in most cases ; But the actual test found that , No other treatment , The probability of resolving the correct result is very low , as a result of : Both sender and receiver may lose sample.
- Correct solution : The closer the parsing window is to the start or end of the sending window , The more likely you are to get the right result .
How to achieve
- We cannot guarantee the time difference between a single parsing window and a sending window , So we need to create additional parsing windows , Just create another one , You don't need more than one , The time difference between the first parsing window and the first parsing window is controlled to be half of the window , as follows :
The sender :000011110000111100001111000011110000111
* situation 1: The first window parsing error , The second window can parse correctly
Receiver window 1:00111100001111....
Receiver window 2: 111100001111.... ( It is half a window longer than the first window )
* situation 1: The first window is parsed correctly , The second window will parse the error
Receiver window 1:000111100001111....
Receiver window 2: 0111100001111.... ( It is half a window longer than the first window )
边栏推荐
- 呕心沥血总结出来的MySQL常见错误以及解决方法(二)
- Electric check code configuration
- Common MySQL errors and solutions summarized painstakingly (II)
- 【工控老马】单片机与西门子S7-200通信原理详解
- 4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?
- 搭建jenkins环境并自动关联打包好的工程jar进行自动发布
- 精选西门子PLC工程实例源码【共300套】
- JS XOR obfuscation code
- PostgreSQL安装:The database cluster initialisation failed,stack Hbulider安装
- Perceiving healthy life, enabling boundless connection -- contributing to openharmony 3.1 ecological construction
猜你喜欢

JSP learning part

C mqtt subscription message

Viewing application and installation of Hana database license

4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?

【kerberos】kerberos 认证浅析

互联网公司的组织结构与产品经理岗位职责是什么?

基于Sophus的Ceres优化
![[industrial control old horse] detailed explanation of the design scheme of the running lamp control system based on Siemens S7-200PLC](/img/c5/9383a02050c83b26bb56f4045b0774.png)
[industrial control old horse] detailed explanation of the design scheme of the running lamp control system based on Siemens S7-200PLC

Vulnhub's DC8 target

穿越过后,她说多元宇宙真的存在
随机推荐
js实现图片懒加载的一个详细方案(引入即可使用)
C#Mqtt订阅消息
Appium 环境搭建
Django - installing mysqlclient error: mysqlclient 1.4.0 or newer is required; you have 0.9.3
Line features & surface features of vSLAM features
SAP ui5 Beginner (I) Introduction
SQL 注入绕过(六)
4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?
1032 Sharing
搭建jenkins环境并自动关联打包好的工程jar进行自动发布
路由详解(九阳真经)
ES中配置ext.dic文件不生效的原因
从Nacos客户端谈Nacos配置中心
C编译器 - 隐式函数声明
互联网公司的组织结构与产品经理岗位职责是什么?
Detailed explanation of route (Jiuyang Scripture)
【深度之眼吴恩达第四期作业班】多元线性回归Linear Regression with multiple variables总结
Soft restart
Using cdockablepane to realize floating window in MFC
1031 Hello World for U