当前位置:网站首页>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 )
原网站

版权声明
本文为[qazw9600]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/180/202206290618375633.html