Info

This question is closed. Reopen it to edit or answer.

I have connected 3 filters in series using the cascade command. The 1st filter decimate by R while the 2nd and the 3rd by two. Which sampling frequency should I use to convert the x-axis scale from normalized frequency to absolute frequency?

1 view (last 30 days)
Fs = 2.3*(53.10348e6); R256 = 256; D = 1; Nsec = 5; Fpass = 5e3; % Passband Frequency Fstop = 15e3;
h = fdesign.decimator(R256, 'CIC', D, 'Fp,Ast', Fpass, Astop, Fs); HCIC256 = design(h, 'multisection');
set(HCIC256, 'Arithmetic', 'fixed', ... 'InputWordLength', 16, ... 'InputFracLength', 15, ... 'NumberofSection', Nsec,... 'FilterInternals', 'MinWordLengths',... 'OutputWordLength', 24);
gainHCIC256 = gain(HCIC256); HCIC256Comp = cascade(dfilt.scalar(1/gain(HCIC256)),HCIC256);
hcomp256 = fdesign.decimator(2, 'CIC Compensator', D, Nsec, 'n,fp,fst', ... N43, Fpass, Fstop, Fs/R256);
Hdcomp256 = design(hcomp256, 'equiripple', ... 'StopbandShape', 'flat');
set(Hdcomp256, 'Arithmetic', 'fixed', ... 'InputWordLength', 24, ... 'InputFracLength', -17, ... 'CoeffWordLength', 12, ... 'CoeffAutoScale', true, ... 'FilterInternals', 'SpecifyPrecision',... 'OutputWordLength', 24,... 'OutputFracLength', -17);
HCCIC256 = cascade(Hdcomp256,HCIC256Comp);
hfirdec23 = fdesign.decimator(2, 'Lowpass', 'n,fp,fst', N23, Fpass,... FstopFIR, Fs/(R256*2));
Hfirdec23 = design(hfirdec23, 'equiripple', ... 'StopbandShape', 'flat');
set(Hfirdec23, 'Arithmetic', 'fixed', ... 'InputWordLength', 24, ... 'InputFracLength', -14, ... 'CoeffWordLength', 12, ... 'CoeffAutoScale', true, ... 'FilterInternals', 'SpecifyPrecision',... 'OutputWordLength', 32,... 'OutputFracLength', -17);
Hd23 = cascade(Hfirdec23,HCCIC256);

Answers (0)

Community Treasure Hunt

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

Start Hunting!