图5.8 滤波器设计界面
(4)设计结果
由Targets菜单下的Generate c header导出的内容,可得到h(n)的系数,并将系数保存在.m文件下,以下是导出的内容:
/*
* Discrete-Time FIR Filter (real)
* -------------------------------
* Filter Structure : Direct-Form FIR
* Filter Order : 51
* Stable : Yes
* Linear Phase : Yes (Type 2)
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* D:\MATLAB7\extern\include\tmwtypes.h
*/
const int BL = 52;
const real64_T B[52] = {
1.960947557231e-005, -5.283998243242e-005, -0.0001750467660928,
3.634041291094e-019, 0.0005169292597881, 0.0004967599126678,
-0.0007390299835443, -0.001717790199919, 2.16160329916e-018,
0.00326898393058, 0.002698970276337, -0.003544119466925,
-0.007420945986872, 6.1073694308e-018, 0.01200360269259,
0.009313881181559, -0.01162917307111, -0.02342931611305,
1.127681595366e-017, 0.03655878635862, 0.0286256042569,
-0.03705660661872, -0.08069279407176, 1.505114811079e-017,
0.1992721540518, 0.3736681398635, 0.3736681398635,
0.1992721540518, 1.505114811079e-017, -0.08069279407176,
-0.03705660661872, 0.0286256042569, 0.03655878635862,
1.127681595366e-017, -0.02342931611305, -0.01162917307111,
0.009313881181559, 0.01200360269259, 6.1073694308e-018,
-0.007420945986872, -0.003544119466925, 0.002698970276337, 0.00326898393058, 2.16160329916e-018, -0.001717790199919,
-0.0007390299835443, 0.0004967599126678, 0.0005169292597881, 3.634041291094e-019, -0.0001750467660928, -5.283998243242e-005,
1.960947557231e-005
};
所设计的FIR数字滤波器如下:
h[0]=h[51]=1.960947557231e-005
h[1]=h[50]= -5.283998243242e-005
h[2]=h[49]=-0.0001750467660928
h[3]=h[48]=3.634041291094e-019
h[4]=h[47]=0.0005169292597881
h[5]=h[46]= 0.0004967599126678
h[6]=h[45]= -0.0007390299835443
h[7]=h[44]= -0.001717790199919
h[8]=h[43]= 2.16160329916e-018
h[9]=h[42]= 0.00326898393058
h[10]=h[41]= 0.002698970276337
h[11]=h[40]=-0.003544119466925
h[12]=h[39]= -0.007420945986872
h[13]=h[38]= 6.1073694308e-018
h[14]=h[37]= 0.01200360269259
h[15]=h[36]= 0.009313881181559
h[16]=h[35]= -0.01162917307111
h[17]=h[34]= -0.02342931611305
h[18]=h[33]= 1.127681595366e-017
h[19]=h[32]= 0.03655878635862
h[20]=h[31]=0.0286256042569
h[21]=h[30]=-0.03705660661872
h[22]=h[29]=-0.08069279407176
h[23]=h[28]=1.505114811079e-017
h[24]=h[27]=0.1992721540518
h[25]=h[26]=0.3736681398635
所设计的FIR低通滤波器的幅频响应、相频响应、零极点图和冲激响应如下所示:
图5.9 凯塞窗设计FIR滤波器的幅频特性曲线
图5.10 凯塞窗设计FIR滤波器的相频特性曲线 FIR数字滤波器的MATLAB设计+文献综述(12):http://www.751com.cn/tongxin/lunwen_2868.html