取消
显示结果 
搜索替代 
您的意思是: 

filtering

已解决!
转到解答

Hi, All,

 

I have a data set (1D array of 500 values) and I am using the LV's basic filter (smootihing with moving average, rectangular, half width = 1) to smooth the noisy data. As you can see on the attached pic, the smoothed curve in red looks shifted by 2 pixels with respect to the original data in white. If I take the difference btw the original and the filtered data as the measure of the noise (green curve), then it will be exaggerated due to this shift. One can write a code to compensate for this, but I wonder if there is a way to correct it in LV. Also, what exactly causes this shift?

 

The second pic shows the sub vi for doing the filtering, etc.

 

Thanks!  

0 项奖励
1 条消息(共 3 条)
3,054 次查看
解答
已被主题作者 femtovahan 接受

The moving average smoothing itself is a low pass filter. As any digital filter, it has phase response. Remember, phase in nature is delay in time. There are some filters featuring zero delay/linear delay but apparently the smoothing filter is not one of them. When you configure the filter, select transfer function in the view mode, you can find phase response in the second graph. Notice that it has a non zero phase delay in most frequencies.

 

You can also increase the width of the filter and you should be able to watch the delay increase as well. So, not much you can do with it other than realigning the signal after filtering if you like.

0 项奖励
2 条消息(共 3 条)
3,040 次查看
Thanks, I agree, it is related to the phase delay, which scales with the window size. Using the LV digital FIR (lowpass) seems to do a better job.
0 项奖励
3 条消息(共 3 条)
3,026 次查看