CIC compensation filter design

22 vues (au cours des 30 derniers jours)
Jay
Jay le 27 Jan 2024
Commenté : Paul le 1 Fév 2024
I have a CIC filter as below:
  • Decimation factor: 20
  • Differential Delay: 1
  • Number of sections: 4
I created cicDecim object by
cicDecim = dsp.CICDecimator(DecimationFactor = 20,...
DifferentialDelay = 1,...
NumSections = 4,...
FixedPointDataType = "Full precision")
cicDecim =
dsp.CICDecimator with properties: DecimationFactor: 20 DifferentialDelay: 1 NumSections: 4 FixedPointDataType: 'Full precision'
The CIC filter has an input with sample rate of 10 MHz and the output of the CIC has the sample rate of 500 kHz (e.g., 10 MHz/20). Now, I want to design a compensation filter after the CIC but am having a hard time to configure the some of parameters. I have the following compensation filter requirements
  • Passband Frequency: 200 kHz
  • Stopband Frequency: 250 kHz
  • Passband Ripple: 1 dB
  • Sample Rate: 500 kHz (The rate of the compensation filter)
I assumed the Passband Frequency and Stopband Frequency as based on the input of the compensation filter (e.g., 500 kHz not 10 MHz).
cicCompDecim = dsp.CICCompensationDecimator('CICDifferentialDelay',1,... % Defined in the cicDecim above
'CICNumSections', 4,... % Defined in the cicDecim above
'CICRateChangeFactor', 20,... % Defined in the cicDecim above
'DecimationFactor', 1,... % The compensation filter is a single rate
'PassbandFrequency', 200000, ... % Passband Frequency 200 kHz
'StopbandFrequency', 250000, ... % Stopband Frequency 250 kHz
'PassbandRipple', 1,... % Passband ripple
'SampleRate', 500000) % Sample rate of the compensation filter = 500 kHz
cicCompDecim =
dsp.CICCompensationDecimator with properties: CICRateChangeFactor: 20 CICNumSections: 4 CICDifferentialDelay: 1 DecimationFactor: 1 DesignForMinimumOrder: true PassbandFrequency: 200000 StopbandFrequency: 250000 PassbandRipple: 1 StopbandAttenuation: 60 SampleRate: 500000 Use get to show all properties
I checked the combined filter response by cascading the CIC and the compensation filters:
filtCasc = dsp.FilterCascade(cicDecim, cicCompDecim);
Fs = 500e3;
f = fvtool(cicDecim, cicCompDecim, filtCasc, 'Fs', [20*Fs Fs 20*Fs]);
I have the following response from the code above.
I'm wondering if the compensation filter design I've done is correct? Or other suggestion that I can improve or optimize the compensation filter?
  3 commentaires
Jay
Jay le 31 Jan 2024
Thanks Paul for your detail explainations, as always! Although your reply is not exactly what I was looking for, I found your codes have many things to learn and inspire me. Thank you for your time and efforts.
Paul
Paul le 1 Fév 2024
You're quite welcome.
What is the concern with the compensation filter as designed? What about it should be optimized or improved?

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by