当前位置:网站首页>[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
边栏推荐
- 黑猫带你学eMMC协议第26篇:eMMC的硬件复位操作(H/W reset)
- [embedded C foundation] Part 3: constants and variables
- LeetCode每日一题(2196. Create Binary Tree From Descriptions)
- Connected Block & food chain - (summary of parallel search set)
- Ccf201912-2 recycling station site selection
- How to use databricks for data analysis on tidb cloud | tidb cloud User Guide
- Brother bird talks about cloud native security best practices
- Flexpro software: measurement data analysis in production, research and development
- leetcode 376. Wiggle Subsequence
- How to view win11 system and reserved space?
猜你喜欢

Brief introduction to JS operator

【C语言易错点】第4篇:结构体在内存中存储规则详讲

【嵌入式C基础】第6篇:超详细的常用的输入输出函数讲解

Comments are not allowed in JSON

Huawei cloud Gao Hongxia: CBC microservice code Reconstruction & independent release practice

2020-12-07

黑猫带你学eMMC协议第26篇:eMMC的硬件复位操作(H/W reset)

Vs code is not in its original position after being updated

Machine learning practice - logistic regression-19

企业数字化本质
随机推荐
Fundamentals of machine learning - support vector machine svm-17
Interview must ask, focus! Tell me about the Android application startup process and its source code?
Machine learning practice - decision tree-22
单调栈Monotonic Stack
【嵌入式C基础】第2篇:进制转换与BCD编码
Force buckle 315 calculates the number of elements smaller than the current element on the right
Black cat takes you to learn EMMC protocol chapter 27: what is EMMC's dynamic capacity?
Leetcode 42. rainwater connection
Datanode data block missing problem finding
BiliBili Yang Zhou: above efficiency, efficient delivery
黑猫带你学eMMC协议第24篇:eMMC的总线测试程序详解(CMD19 & CMD14)
[embedded C foundation] Part 6: super detailed explanation of common input and output functions
[July 5 event preview] Flink Summit
How many times can the WordPress user name be changed? Attach the method of changing user name
Storage model: big end and small end
Android engineers, how to use kotlin to provide productivity?
What is C generic, generic cache, generic constraint
[graduation design] heart rate detection system based on single chip microcomputer - STM32 embedded Internet of things
Analysis of Andriod low on memory printing principle
[graduation design teaching] ultrasonic ranging system based on single chip microcomputer - Internet of things embedded stm32