CIC compensation filter design

28 次查看(过去 30 天)
Jay
Jay 2024-1-27
评论: Paul 2024-2-1
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 个评论
Jay
Jay 2024-1-31
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 2024-2-1
You're quite welcome.
What is the concern with the compensation filter as designed? What about it should be optimized or improved?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate and Multistage Filters 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by