1 Bit CIC Filter Input realization with dsp.CICDecimator

4 vues (au cours des 30 derniers jours)
Denis Shuklin
Denis Shuklin le 1 Sep 2016
Hello,
I'm realizing my CIC Filter w. 1 Bit Input in Full Precision with following code:
D = 1; % Differential delays in the filter.
Nsecs = 4; % Filter sections
R = 128; % Decimation factor
iwl = 1; %input word length
hcic = mfilt.cicdecim(R,D,Nsecs,iwl); %
And get following warning: "Warning: mfilt.cicdecim will be removed in a future release. Use dsp.CICDecimator instead. " It's not so bad for me, I thought, until I tried to cascade this CIC with a compensation filter:
% FIR Filter specifications
Fs = 8e3; % Sampling frequency 1024kHz/128
Apass = 0.1; % dB
Astop = 100; % dB
Fpass = 1e3; % Hz passband-edge frequency
Fstop = 2e3; % Hz stopband-edge frequency
% Design decimation filter. D and Nsecs have been defined above as the
% differential delay and number of sections, respectively.
hcfir = dsp.CICCompensationDecimator('SampleRate',Fs,...
'CICRateChangeFactor',R,'CICNumSections',Nsecs,...
'CICDifferentialDelay',D,'PassbandFrequency',Fpass,...
'StopbandFrequency',Fstop,'PassbandRipple',Apass,...
'StopbandAttenuation',Astop);
And got this error messages:
Array formation and parentheses-style indexing with objects of class 'dsp.CICCompensationDecimator' is not
allowed. Use objects of class 'dsp.CICCompensationDecimator' only as scalars or use a cell array.
Error in mfilt.cascade (line 52)
if ~(isa(varargin{k}(end),'dfilt.abstractfilter') || isa(varargin{k}(end),'dfilt.multistage')),
Error in dfilt.basefilter/cascade (line 30)
Hd = mfilt.cascade(varargin{:});
Error in cic_test (line 85)
hcas1 = cascade(hcic,hcfir);
How can I avoid this errors? I don't found the option to specify the InputWordLegth in dsp.CICDecimator.
Thank you!

Réponses (0)

Catégories

En savoir plus sur Multirate and Multistage Filters dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by