필터 지우기
필터 지우기

CIC compensation filter design

조회 수: 20 (최근 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