确定频率的持续时间和幅度
我正在使用一个系统,在该系统中我以 1KHz 的频率从传感器(陀螺仪)获取数据。
我想做的是确定系统何时振动,以便我可以调低输出上的 PID 增益。
我目前拥有的是对传入值的高通滤波器。然后我将 alpha 值设置为 1/64,我相信该值应该过滤大约 10KHz 的频率。然后,我取这个值,如果它是单独高于阈值的,则进行积分。当我的积分值超过另一个阈值时,我就会假设系统正在振动。我还每半秒重置一次积分值,以确保它确实朝着阈值增长。
我试图用这个系统做的是确保它确实在振动并且不会出现摇晃。我尝试对积分值添加的上限进行设置,但这似乎并没有真正起作用。
我正在寻找的是任何更好的方法来检测系统正在振动,并且不受震动的影响,我的主要问题是我不会错过检测振动的震动,因为那样会导致值PID 不必要地降低。
I am working with a system in which I am getting data from a sensor (gyro) at 1KHz.
What I am trying to do is determine when the system is vibrating so that I can turn down the PID gains on the output.
What I currently have is a high pass filter on the incoming values. I then have set the alpha value to 1/64, which I believe should be filtering for about a 10KHz frequency. I then take this value and then integrate if it is individual above a threshold. When my integrated value passes another threshold, I then assume that the system is vibrating. I also reset the integrated value every half second to ensure that it does simply grow towards the threshold.
What I am trying to do with this system is make sure that it is really vibrating and not seeing a jolt. I have tried to do this with a upper limit to how much will be added to the integrated value, but this is not really appearing to work.
What I am looking for is any better way to go about detecting that the system is vibrating, and not being effected by a jolt, my primary issue is that that I do not miss detect a jolt for a vibration because then that will cause the values on the PID to be lowered unnecessarily.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
快速傅里叶变换。它将把“震动”从振动中分离出来,因为震动会在所有频率上记录下来,而振动会在特定频率附近出现峰值。
FFT. It will separate out the "jolts" from the vibrations, because jolts will register across all frequencies and vibrations will spike around a particular frequency.
我同意以上观点。在线有许多用于快速傅里叶变换的免费算法。如果您不熟悉 FFT,它是一种定义了
时域中的函数及其在频域中的表示,使得
分析原始函数的频率内容。这将使您能够确定信号或时间序列中是否存在任何噪声或振荡行为。
您可以用来确定时间序列是否具有潜在周期性的另一种方法是结构函数(结构函数分析)。结构函数分析提供了一种量化信号时间变化的方法,而不会出现使用传统 FFT 技术时遇到的混叠或加窗问题。它有可能提供有关导致变异的过程性质的信息。该方法主要涉及潜在噪声过程的分类和相关时间尺度的识别。这是一个相当简单的算法,您可以自己编写。
更进一步、更“时髦”的是使用小波变换。傅里叶分析是一种非常强大的工具,用于检测和量化时间序列中的周期性振荡;这是真正恒定周期、相位和幅度的信号。然而,真实的系统几乎从未表现出如此一致的行为。周期性振荡通常作为瞬态现象间歇性地出现。尽管傅里叶分析可以在某种程度上检测和量化这种瞬态行为,但对于此类目的来说它还远非理想。小波分析的发展就是为了克服这些困难。请参阅http://atoc.colorado.edu/research/wavelets/software.html 有关小波的一些源代码和更多信息。
I agree with the above. There are many free algorithms for the Fast Fourier Transform avalible online. If you are not familiar with the FFT it is an operation that defines a relationship between a
function in the time domain and its representation in the frequency domain, enabling
analysis of the original function’s frequency content. This will enable you to determine if there is any noise or oscillatory behavior in your signal or time-series.
Another method your could use to establish whether your time-series has underlying periodicity is that of the Structure Function (Structure Function Analysis). Structure function analysis provides a method of quantifying time variability in a signal without the problem of aliasing, or windowing, that are encountered using the traditional FFT technique. Potentially it is able to provide information on the nature of the process that causes variability. The method is mainly concerned with the categorization of underlying noise processes and the identification of correlation time-scales. This is a fairly simple algorithm that you could probably write yourself.
Going one step further and being more "snazzy" would be to use a Wavelet Transform. Fourier analysis is a very powerful tool for detecting and quantifying periodic oscillations in time-series; that is signals of truly constant period, phase, and amplitude. However, real systems almost never exhibit such consistent behavior; periodic oscillations often arising intermittently as transient phenomenon. Although Fourier analysis can, to some extent detect and quantify such transient behavior, it is far from ideal for such purposes. Wavelet analysis has been developed to overcome these difficulties. See http://atoc.colorado.edu/research/wavelets/software.html for some source code and more information about wavelets.