【问题标题】:How do I filter a certain frequency using MATLAB?如何使用 MATLAB 过滤某个频率?
【发布时间】:2011-04-18 15:14:03
【问题描述】:

我已经对一些实验数据进行了傅立叶变换,以计算流动中振动的主频率,但我在 1000 处得到了一个尖峰,这是来自干扰。如何忽略或过滤此频率以获得正确的频率分布?

【问题讨论】:

  • 您可以查看previous question on hi-pass filtering 的答案。它们中有很多细节,您只需将通带从高通更改为低通即可获得所需的效果。
  • 如果您只需要去除单个频率分量,我建议您设计一个陷波滤波器

标签: matlab fft


【解决方案1】:

最简单的方法可能是使用Matlab函数iirnotch

x = ; % Populate this with your input signal

fsHz = ; % Populate this with your sample rate
notchFreqHz = 1000; % The frequency you with to notch
notchWidthHz = 50; % Notch width (-3 dB bandwidth)

w0 = notchFreqHz / fsHz; % Normalized notch frequency
bw = notchWidthHz / fsHz; % Normalized bandwidth

[num,den] = iirnotch(w0, bw);

y = filter(num, den, x); % Apply the filter, y is the output signal

更多详情请见Second-order IIR notch filter - MATLAB iirnotch

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-18
    • 1970-01-01
    • 2012-12-27
    • 2021-09-13
    相关资源
    最近更新 更多