Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | How do I calculate frequency response of multi-stage CIC interpolation filter?

There are 5 messages in this thread.

You are currently looking at messages 0 to 5.


How do I calculate frequency response of multi-stage CIC interpolation filter? - G Iveco - 2007-09-26 10:24:00

Here is the code, two stages differetiator, and two stage integrator.
It's very common but how do I plot the frequency response?

TIA!


d = cos(2*pi*(1:1e3)/1e2);
e = zeros(length(d)*10, 1);

db = [1 0 -1];
da = [1];

c0 = filter(db, da, d);
c1 = filter(db, da, c0);

ib = [1];
ia = [1 -1];

e(1:10:end) = c1;

c2 = filter(ib, ia, e);
c3 = filter(ib, ia, c2)/10/10;

figure;
subplot(2,1,1); plot(d);
subplot(2,1,2); plot(c3);



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How do I calculate frequency response of multi-stage CIC interpolation filter? - mnentwig - 2007-09-26 10:39:00



Matlab's "fvtool" should do the job for any z-domain filter.
If you have multiple stages, use conv() to multiply numerators and
denominators of several stages into one.

-mn
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How do I calculate frequency response of multi-stage CIC interpolation filter? - G Iveco - 2007-09-26 11:05:00

"mnentwig" <m...@elisanet.fi> wrote in message 
news:p...@giganews.com...
> Matlab's "fvtool" should do the job for any z-domain filter.
> If you have multiple stages, use conv() to multiply numerators and
> denominators of several stages into one.
>
> -mn

Thank you I was aware of conv and multi stage filter in fixed sampling rate.
But in CIC interpolation, the sampling rate is not fixed, so I am not sure 
how
to use conv/freqz stuff to plot it.



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How do I calculate frequency response of multi-stage CIC interpolation filter? - mnentwig - 2007-09-26 11:31:00

Right...
I think you can write out the whole chain at the highest sampling rate
(i.e. insert all zero samples at the input, space out filter coefficients
of each stage according to the rate, and carry all decimated samples to
the output).
At least I believe that's the approach I have used occasionally.

Maybe someone else can comment?

-mn


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How do I calculate frequency response of multi-stage CIC interpolation filter? - Rick Lyons - 2007-09-27 18:29:00

On Wed, 26 Sep 2007 22:24:29 +0800, "G Iveco" <G...@google.com>
wrote:

>Here is the code, two stages differetiator, and two stage integrator.
>It's very common but how do I plot the frequency response?
>
>TIA!
>
>
>d = cos(2*pi*(1:1e3)/1e2);
>e = zeros(length(d)*10, 1);
>
>db = [1 0 -1];
>da = [1];
>
>c0 = filter(db, da, d);
>c1 = filter(db, da, c0);
>
>ib = [1];
>ia = [1 -1];
>
>e(1:10:end) = c1;
>
>c2 = filter(ib, ia, e);
>c3 = filter(ib, ia, c2)/10/10;
>
>figure;
>subplot(2,1,1); plot(d);
>subplot(2,1,2); plot(c3);

Hi,
  how about this:

B = [1, 0, 0, 0, 0, 0, -1]; A = [1, -1]; %  CIC filter coeffs
[ImpResp1, T] = impz(B, A, 20); % Single CIC imp. resp.
ImpResp2 = conv(ImpResp1, ImpResp1); % Two-stage CIC imp. resp.

[FreqResp1, W] = freqz(ImpResp1, 1, 512);
FreqMagResp1 = abs(FreqResp1);
[FreqResp2, W] = freqz(ImpResp2, 1, 512);
FreqMagResp2 = abs(FreqResp2);

figure(1)
subplot(3,1,1)
plot(ImpResp1, '-bo')
grid on, zoom on
subplot(3,1,2)
plot(ImpResp2, '-ro')
grid on, zoom on

subplot(3,1,3)
plot(FreqMagResp1, '-b')
hold on
plot(FreqMagResp2, '-r')
hold off, grid on, zoom on

G Iveco,
The DC gain of the first CIC filter is 6.
The DC gain of two cascaded CIC filters is 36.

Good Luck,
[-Rick-]



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.