All All: Clear Close CLC
All All: Clear Close CLC
==========
% CIC Filter Analysis Script
%
% Compute CIC filter frequency response, compensation filter
coefficients,
% and compensated frequency response for a given set of design
paramenters.
%
%
%
Author: Tom Chatt
%
%
Revision History:
%================================================================
==========
%
09/23/2010
Tom Chatt
Initial
Version
%================================================================
==========
clear all; close all; clc;
%=============================
% CIC Filter Design Parameters
%=============================
N = 3;
% Sinc/Comb-Filter order
M = 1;
% Stage delay (should be 1 or 2).
D = 64;
% Decimation factor
fs = 10e6;
% Pre-decimation sampling Frequency
fs_lo = fs / D;
% Post-decimation sampling frequency
%==============================
% Compensator Design Parameters
%==============================
B = 12; % Compensator coefficient bit width
% fir2 parameters
fc = fs/D/2;
% Ideal cutoff frequency
L = 16;
% Filter order - 1. Must be even. Final filter
length is L + 1.
Fo = D*fc/fs;
% Normalized cutoff frequency
%=====================================================
% Generate and plot filters
%
Granularity
Step size
Pass band frequency samples
Stop band frequency samples
Normalized frequency samples, 0 <=