二进制相移在Python键控 [英] Binary Phase Shift Keying in Python

查看:147
本文介绍了二进制相移在Python键控的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前工作的一些code过度使用音频转换激光传输信息/文件/数据和其他数据。我现在的code使用hexlify功能从蟒蛇的binascii模块将数据转换为二进制,然后发出一个音调为1和不同的音在理论上作品0。这虽然不是最快的方法EN code /德code,但在测试中也被证明是一些错误。

I'm currently working on some code to transmit messages/files/and other data over lasers using audio transformation. My current code uses the hexlify function from the binascii module in python to convert the data to binary, and then emits a tone for a 1 and a different tone for a 0. This in theory works, albeit not the fastest way to encode/decode, but in testing there proves to be a few errors.


  1. 产生不当场就色调,即:发光150Hz的可以变成是145-155Hz在接收端,这是不是一个巨大的问题,因为我可以只设置的界限在接收端低或更高。

  1. the tones generated are not spot on, ie: emitting 150Hz can turn out to be 145-155Hz on the receiving end, this isn't a huge issue as I can just set the boundaries on the receiving end lower or higher.

,真正的问题是,如果我发出声音,并且它被播放,在接收端计算机可能多次读或不读它在所有的基础上的速率进行采样的输入音频。我试图以相同的速度进行采样播放音,但是这是非常玄乎。

the real problem is that if I emit a tone, and it is played, the computer on the receiving end may read it multiple times or not read it at all based on the rate it samples the incoming audio. I have tried to play the tones at the same speed it samples, but that is very iffy.

在所有,我有一对夫妇利用短消息的成功运行的,但是这是非常不可靠的和不准确的,由于上述问题

In all, I have had a couple of successful runs using short messages, but this is very unreliable and inaccurate due to the above mentioned issues.

我已经考虑过这问题,并进一步为一个解决方案看起来可能包括BPSK或二进制相移键控,虽然我不知道如何实现这一点。任何建议或code样品将AP preciated!

I have looked into this further and a solution to this looks like it could involve BPSK or Binary Phase Shift Keying, although I'm not sure how to implement this. Any suggestions or code samples would be appreciated!

该项目我的code可以在这里找到 但我工作的主要文件二进制解码和编码这是这里和的here 的。我不是在蟒蛇的专家,请原谅我,如果任何我说是错的,我的code是不是最好的,或者如果我忽略了一些基本的东西。

My code for the project can be found here but the main files I'm working on are for binary decoding and encoding which is here and here. I'm not an expert in python so please pardon me if anything I've said is wrong, my code isn't the best, or If i've overlooked something basic.

谢谢! : - )

推荐答案

看看的GNU Radio!

Take a look at GNU Radio!

<一个href=\"http://gnuradio.org/redmine/projects/gnuradio/wiki\">http://gnuradio.org/redmine/projects/gnuradio/wiki

GNU Radio是一个项目做,在软件方面,无线电信号的发送或接收尽可能多的可能。由于电台已经使用相移键控,GNU Radio的家伙已经解决了这个问题对你来说,和GNU电台已经是一个Python项目!而复杂的DSP东西是用C ++编写的速度,但包裹在Python中使用。

GNU Radio is a project to do, in software, as much possible of radio signal transmission or reception. Because radio already uses phase shift keying, the GNU Radio guys have already solved the problem for you, and GNU Radio is already a Python project! And the complicated DSP stuff is written in C++ for speed, but wrapped for use in Python.

下面是讨论使用差分二进制相移键控(DBPSK)的一个项目的网页/差分正交相移键控(DQPSK)传送二进制数据(在本例中,JPEG图像)。 Python源$ C ​​$ c是可供下载。

Here is a page discussing a project using Differential Binary Phase Shift Keying (DBPSK)/ Differential Quadrature Phase Shift Keying (DQPSK) to transmit binary data (in the example, a JPEG image). Python source code is available for download.

<一个href=\"http://www.wu.ece.ufl.edu/projects/softwareRadio/\">http://www.wu.ece.ufl.edu/projects/softwareRadio/

我看你的项目是在MIT许可下。 GNU Radio是GPL3,这可能是你的问题下。你需要弄清楚,如果你可以使用GNU电台,而无需使您的项目成为一个派生的工作,从而迫使你改变你的许可。它应该有可能使一个独立的送守护和一个独立的接收守护,无论其来源$ C ​​$ C是GPL3,然后让你的MIT code连接到他们通过套接字或东西。

I see that your project is under the MIT license. GNU Radio is under GPL3, which may be a problem for you. You need to figure out if you can use GNU Radio without needing to make your project into a derived work, thus forcing you to change your license. It should be possible to make a standalone "sending daemon" and a standalone "receiving daemon", both of whose source code would be GPL3, and then have your MIT code connect to them over a socket or something.

顺便说一句,我搜索发现之一的BPSK如何运作这个非常清晰的解释:

By the way, one of my searches found this very clear explanation of how BPSK works:

http://cnx.org/content/m10280/latest/

祝你好运!

这篇关于二进制相移在Python键控的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆