Python implements FIR low-pass filter design

FIR (Finite Impulse Response, finite impulse response) low-pass filter is a digital filter that can be used in digital signal processing to perform low-pass filtering on signals.

Here is a simple Python code example for designing a FIR low-pass filter:

import numpy as np
from scipy import signal

# 设定滤波器的截止频率(单位:Hz)
cutoff_frequency = 0.1

# 设定滤波器的采样频率(单位:Hz)
sampling_frequency = 1.0

# 设定滤波器的阶数
order = 5

# 计算滤波器的系数
b = signal.firwi

Guess you like

Origin blog.csdn.net/weixin_42610671/article/details/129501135