当前位置:网站首页>[FPGA] FIR filter - half band filter
[FPGA] FIR filter - half band filter
2022-07-28 13:10:00 【Summer is cool and autumn falls】
List of articles
1. Definition of half band filter
Half band filter is a special FIR filter , Its The order can only be even , Odd length . The filter coefficient except the intermediate value is 0.5 Outside , rest The coefficients of even numbers are 0( Therefore, the multiplication and addition operations during filtering are greatly saved ), Half band filter is a special low-pass FIR Digital filter . This filter is due to Passband and stopband are relative to one-half Nyquist Frequency symmetry , Therefore, nearly half of the filter coefficients are accurate to zero .
Half band FIR General frequency response of filter :
The amplitude frequency response is about π/ 2(fs/4) symmetry , The sampling rate is normalized to 2π radians/sec, The relationship between passband and stopband frequency is :
The passband and stopband ripple are equal , These characteristics are reflected in the impulse response of the filter ; for example , For filters with an odd number of tap coefficients , About half of the coefficients are zero and interlaced between non-zero coefficients . The figure below 3-20, Yes. 11 A tapped half band filter :

When realizing half band filter , The effective implementation structure obtained by using this feature is shown in the figure below :
Particular attention :
Digital filters are 2π The normalized ,2π Corresponding fs Sampling rate . This and FFT The result is the same . Sampling time discrete series , Spectrum to 2π For cycles ,( Also with Fs For cycles )
2 Usage example of half band filter
requirement : The signal frequency is 25hz and 50hz, The sampling rate is 120hz, Design a half band filter to filter out 50hz The frequency component of
Filter design process :
% The signal frequency is 25hz and 50hz, The sampling rate is 120hz, Design a half band filter to filter out 50hz The frequency component of
clear all;
clc;
fs=120;
f0=25;
f1=50;
N=256;
n=0:(N-1);
% signal = sin(2*pi*f0/fs*n);
signal = sin(2*pi*f0/fs*n)+sin(2*pi*f1/fs*n);
coff = [0,0.0671297764639564,0,-0.0953987484367994,0,0.314556319097219,0.500000000000000,0.314556319097219,0,-0.0953987484367994,0,0.0671297764639564,0];
signal_f = filter(coff,1,signal);
fft_plot(signal,fs,' Signal before filtering ');
fft_plot(signal_f,fs,' Filtered signal ');
function fft_plot(y,fs,s_name)
L_i = length(y)*100;
s_i_fft = fft(y,L_i);
s_i_fftshfit = fftshift(s_i_fft);
P = abs(s_i_fftshfit)/length(y)*2; % For non DC components or 0 It's divided by N multiply 2, For the DC component, it is directly divided by N
% fshift = (-L_i/2:L_i/2-1)*(fs/L_i);
fshift = linspace(-fs/2,fs/2,L_i);
figure;
plot(fshift,P);
title([s_name,' Bilateral spectrum of ']);
xlabel('f (Hz)');
ylabel('|P(f)|');
end
The results are shown in the following figure :
Reference material :
【1】FPGA Signal processing series ——FIR Half band decimation filter
【2】MATLAB Generate FPGA COE Document XILINX FPGA Filter coefficients
【3】fdatool Toolbox design FIR Digital filter
边栏推荐
- Leetcode206 reverse linked list
- Application and download of dart 3D radiative transfer model
- 机器学习实战-逻辑回归-19
- 05 pyechars basic chart (example code + effect diagram)
- 20220728 common methods of object class
- Black cat takes you to learn EMMC Protocol Part 24: detailed explanation of EMMC bus test program (cmd19 & cmd14)
- Databinding+livedata can easily realize skin changing without restart
- The largest rectangle in leetcode84 histogram
- Code layered management of interface testing based on RF framework
- [embedded C foundation] Part 1: basic data types
猜你喜欢

Application and download of dart 3D radiative transfer model

Original juice multifunctional Juicer touch chip-dlt8t02s-jericho
![[embedded C foundation] Part 2: binary conversion and BCD coding](/img/12/d9a42cf7b4dc177d00e5dc3cdaa5cd.png)
[embedded C foundation] Part 2: binary conversion and BCD coding

Understanding of vite2

Scala transformation, filtering, grouping, sorting

Quick read in

SSM框架网上书城全套

Brief introduction to JS operator

How to use databricks for data analysis on tidb cloud | tidb cloud User Guide

黑猫带你学eMMC协议第26篇:eMMC的硬件复位操作(H/W reset)
随机推荐
Databinding+LiveData轻松实现无重启换肤
01 introduction to pyechars features, version and installation
Full disclosure! Huawei cloud distributed cloud native technology and Practice
【嵌入式C基础】第1篇:基本数据类型
Fundamentals of machine learning Bayesian analysis-14
云原生—运行时环境
LeetCode每日一题(2196. Create Binary Tree From Descriptions)
Black cat takes you to learn EMMC Protocol Part 24: detailed explanation of EMMC bus test program (cmd19 & cmd14)
[July 5 event preview] Flink Summit
Leetcode remove element & move zero
单调栈Monotonic Stack
How to view win11 system and reserved space?
Sliding Window
[pictures and texts] detailed tutorial of one click reinstallation of win11 system
[basic teaching of Bi design] detailed explanation of OLED screen use - single chip microcomputer Internet of things
[graduation design] oscilloscope design and Implementation Based on STM32 - single chip microcomputer Internet of things
Monotonic stack
【嵌入式C基础】第3篇:常量和变量
Sliding Window
Merge sort