python信号滤波_如何在Python中编写采样信号的低通滤波器?

Sorry for question that may be trivial, but I am new in signal processing, and I didn't find python code with good explanation. So I will be glad to get explanation for dummy :)

I have some signal that sampled each 1 nsec (1e-9 sec) and have, let say, 1e4 points.

I need to filter high frequencies from this signal. Let say I need to filter frequencies higher than 10MHz.

I want that for frequencies lower than cutoff frequency signal will be passed unchanged. It means gain of the filter will be 1 for frequencies lower than cutoff frequency.

I would like to be able to specify filter order. I mean, fitsr order filter have 20 db/decade slope (power rolloff) after cutoff frequency, second order filter have 40 db/dec slope after cutoff frequency and so on.

High perfomance of code is importent.

Thank you very much for help.

Alex.

解决方案

You appear to have two questions:

How do I design a lowpass filter with a 10MHz cutoff frequency and an arbitrary filter order?

How do I realise that filter in Python?

Filter design is beyond the scope of Stack Overflow - that's a DSP problem, not a programming problem. Filter design is covered by any DSP textbook - go to your library. I like Proakis and Manolakis' Digital Signal Processing. (Ifeachor and Jervis' Digital Signal Processing isn't bad either.)

If you must have teh coeds, try this blog post, which shows how to design a Butterworth lowpass filter with scipy.

As for implementation of the filter in Python, scipy has a lfilter() function which applies a FIR or IIR filter to a signal in one dimension.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值