简体   繁体   English

在恒定信号上应用高通滤波器

[英]Applying a high-pass filter on constant signal

I recently implemented a Butterworth high-pass filter (2nd order). 我最近实施了Butterworth高通滤波器(二阶)。 Everything seems to work fine, except that I have a question when applying such a filter to a constant signal. 一切似乎都运行正常,除了我在将这样的滤波器应用于恒定信号时有一个问题。 As there are no high-frequency components in a constant signal, I would expect the filter to yield a constant 0 signal. 由于恒定信号中没有高频分量,我希望滤波器产生恒定的0信号。

In the plots below are my results. 在下面的图中是我的结果。 There seems to be ``ripple'' in the first couple of frames before the high-pass filtered signal (correctly) converges to 0. 在高通滤波信号(正确)收敛到0之前,前几帧中似乎存在“纹波”。

Is this a logical result from applying a Butterworth high-pass filter on a constant signal, or might there be a bug in my code? 这是在恒定信号上应用Butterworth高通滤波器的逻辑结果,还是我的代码中可能存在错误?

EDIT: I've created the same filter in Octave, resulting in the same output. 编辑:我在Octave中创建了相同的过滤器,产生相同的输出。 This indicates that we're indeed looking at the step response, as Paul R. indicates. 这表明我们确实正在研究阶跃响应,正如Paul R.所指出的那样。

在此输入图像描述

在此输入图像描述

The input to your filter is essentially a step function (since it has value 0 prior to t = 0, and a positive value for t > 0), so you see the step response of the filter, hence the initial ringing. 滤波器的输入本质上是一个阶跃函数(因为它在t = 0之前的值为0,而t> 0的正值),因此您可以看到滤波器的阶跃响应 ,因此初始振铃。 This is expected behaviour, and after a suitable amount of time the step response will have settled to zero. 这是预期的行为,并且在适当的时间之后,步骤响应将已经稳定为零。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM