如何确定互补滤波器的参数α? [英] How to determine the parameter alpha of a Complementary Filter?
问题描述
我在数字信号处理方面很新,也许一些非常基本的解释会有很大的帮助。 / p>
假设我有一个互补过滤器,如下所示:
$ p $ y = a * y +(1 - a)* x
然后我的参数 a
可以通过
a = time_constant /(time_constant + sample_period)
来计算, >
其中 sample_period
仅仅是 sampling_frequency
的倒数。
time_constant
好像是由我自己选择的。 我的问题:
- 这个计算背后的理论是什么?
- 我们如何正确选择
time_constant
?
注意:我也 pos在 robotics 上提出这个问题,因为答案在重点上可能略有不同。
这个计算背后的理论是什么?
我会推荐:
平衡过滤器:为平衡平台集成加速度计和陀螺仪测量的简单解决方案。
我们如何正确选择time_constant? / b>
直观上, time_constant
是信任高通和低通滤波器部分。对于比 time_constant
更短的时间,您更相信高通滤波器部分,而长时间信任低通滤波器部分的时间更多。
通常情况下,你有一些处理物理过程的经验,你可以猜测至少是 time_constant
。例如,如果您正在融合加速度计和陀螺仪数据(我假设您根据您的其他问题进行了测试),则0.5-1秒之间的数值是合理的首选猜测。然后,你开始调整你的过滤器,通过分析它在实际数据上的表现并相应地调整 a
。
I know that the Complementary Filter has the functions of both LPF and HPF. But I think my understanding on the principal behind it is still unclear.
I am quite new on digital signal processing, and maybe some very fundamental explanations will help a lot.
Say I have a Complementary Filter as follows:
y = a * y + (1 - a) * x
Then my parameter a
may be calculated by
a = time_constant / (time_constant + sample_period)
,
where the sample_period
is simply the reciprocal of the sampling_frequency
.
The time_constant
seems to be at my own choice.
My Questions:
- What is the theory behind this calculation?
- How do we choose the
time_constant
properly?
Note: I also posted this question on robotics, as the answers there are likely to be slightly different in emphasis.
What is the theory behind this calculation?
For a human readable introduction I would recommend:
The Balance Filter: A Simple Solution for Integrating Accelerometer and Gyroscope Measurements for a Balancing Platform.
How do we choose the time_constant properly?
Intuitively, the time_constant
is the boundary between trusting the high-pass and the low-pass filter part. For shorter times than the time_constant
you trust the high-pass filter part more, and for longer times you trust the low-pass part more.
Usually, you have some experience with the physical process you are dealing with and you can guess at least the order of magnitude of the time_constant
. For example, if you are fusing accelerometer and gyro data (which I assume you do based on your other question), something between 0.5-1 second is a reasonable first guess. Then, you start tuning your filter by analyzing its performance on actual data and adjusting a
accordingly.
这篇关于如何确定互补滤波器的参数α?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!