cic.m

来自「matlab实现一个decimation为4的CIC滤波器」· M 代码 · 共 46 行

M
46
字号
%CIC decimation filter with Decimator=5,differitial factor=1 and stage
%number=4;
M = 4; % Decimation factor
D = 1; % Differential delay
Fp = 7.4e5; % 2 MHz
Ast = 80; % 80 dB
Fs = 50e6; % 100 MHz
Hf = fdesign.decimator(M,'CIC',D,'Fp,Ast',Fp,Ast,Fs);
Hcic = design(Hf);
Hcic.arithmetic = 'fixed';
Hcic.InputWordLength = 2; 
Hcic.InputFracLength = 1;
%Hcic.SectionWordLengthMode='SpecifyWordLengths';
%Hcic.SectionWordLengths=2^8;
Hcic.filterInternals = 'specifyPrecision';
Hcic.outputWordLength = 10;
Hcic.outputFracLength = 0;

%info about this filter
Discrete-Time FIR Multirate Filter (real)                            
-----------------------------------------                            
Filter Structure        : Cascaded Integrator-Comb Decimator         
Decimation Factor       : 4                                          
Differential Delay      : 1                                          
Number of Sections      : 4                                          
Stable                  : Yes                                        
Linear Phase            : Yes (Type 1)                               
                                                                     
Input                   : s2,1                                       
Output                  : s10,0                                      
Filter Internals        : Specified Word Lengths and Fraction Lengths
  Integrator Section 1  : s10,1                                      
  Integrator Section 2  : s10,1                                      
  Integrator Section 3  : s10,1                                      
  Integrator Section 4  : s10,1                                      
  Comb Section 1        : s10,1                                      
  Comb Section 2        : s10,1                                      
  Comb Section 3        : s10,1                                      
  Comb Section 4        : s10,1                                      
                                                                     
Implementation Cost                                                  
Number of Multipliers : 0                                            
Number of Adders      : 8                                            
Number of States      : 8                                            
MultPerInputSample    : 0                                            
AddPerInputSample     : 5             

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?