半带滤波器设计实现(Matlab,Simulink,Verilog)

标签:
杂谈 |
分类: 硬件描述语言 |
通带截止频率近似3KHz,阻带截止频率近似5KHz
fs = 16e3;
n
x
b
impz(b);
h
figure
y_fi = filter(h,x);
x = double(x);
y = double(y_fi);
y = y/max(abs(y));
stem(n(1:44)/fs,x(1:44),'r');
xlabel('时间(sec)');
ylabel('输入信号');
hold on
figure
stem(n(1:2:44)/fs,y(5:26),'filled');
xlabel('信号值');
ylabel('时间(sec)');
http://s10/middle/6840802c48e9c267a8369&690
http://s7/middle/6840802c48e9c27cc7df6&690
设计的半带滤波器抽头系数
0.00560198262150479
0
-0.0162426507322625
0
0.0388224806300773
0
-0.0893345598303821
0
0.312377747310891
0.500000000000000
0.312377747310891
0
-0.0893345598303821
0
0.0388224806300773
0
-0.0162426507322625
0
0.00560198262150479
对抽头系数进行量化并放大至整数倍可以得到如下的结果
h(0) =
h(18)
h[4] =
h[14]
h[8] =
h[10]
为了便于FPGA的设计,将抽头系数放大至2^14倍数,注意在最后的结果中通过移位操作将结果右移14位,即除以2^14,得到正确结果。
h[0] = h[18] = 92
, h[2] = h [16] =
h[4] = h[14] =
636
h[8] = h[10] =
5118
Simulink中搭建的半带滤波器模块:http://s16/middle/6840802c48e9c2f15baff&690
示波器显示的结果
http://s10/middle/6840802c48e9c33da5469&690
`timescale 1ns / 1ps