while testing with a synthetic PDM (like sigma-delta) signal, I came across an interesting result. The CIC filter with N=5 and M=1 is going to give better performance than an FIR filter of the order 128 for a given downsampling factor 16. I was in an impression that CIC filter is efficient however, the accuracy is going to be lesser than that of an FIR of nominal order. Any comments ?
the top one is with cic and bottom one is the result with FIR. note that the THD is really comparable. No CFIR is includes as i feel CFIR is not going to affect the THD adversely.
the code i used for creating the pdm sample is attached along with other utility scripts...tst_pdm.m
I'm suggesting you read a paper i wrote with title
Reduce Energy Requirements by Coupling a Poly-Phase Pre-filter and CIC Filter in High-Performance Sigma-Delta A/D Converters. i have attached a copy to this response.
to entice you to read the paper I have copied the abstract
Abstract— The CIC filter is often used as a decimating filter to simultaneously reduce bandwidth and sample rate of the time series obtained at the output of a 1-bit Sigma-Delta converter. The conventional motivation for using the CIC is that the filtering is performed with only registers and adders, there being no multipliers in the CIC filter chain. We note that every FIR filter processing the output of a 1-bit sigma delta converter can also be implemented without multipliers. The CIC filter does not take advantage of the fact that the input samples are limited to two input levels. It is possible to design FIR filters using the two level input signal to form efficient multiply free filters that compare favorably with the CIC filter. We present here a partition of the filter and down sampling task into a cascade of a polyphase pre-filter that performs a first bandwidth and sample rate reduction without multiplies followed by a reduced sample rate CIC filter performing the second bandwidth and sample rate reduction. Operating the second filter as a CIC at a reduced output rate reduces its workload and the bit width required by its accumulators.
I believe the polyphase FIR actually outperforms the CIC... for the same number of adds as performed in the CIC integrator chain, the FIR has better stop band and better passband than the cic.... This is because the repeated stopband zeros of the CIC are no match for the distributed zeros of the properly designed CIC. We also don't have to correct for the sinx/x mainlobe tilt nor do we require have the wide width accummulator registers of the CIC integrators...
Would be pleased to continue this discussion with you..
Thank you Fred. Please attach the paper once again. Looks like the document is missing in the thread.
Thank you Fred. I tried to apply the hybrid approach as in your paper. the result is attached.
the bottom one is the new plot which uses pre fir filter along with a cic.
to get the configuration similar to the Figure 9 of your paper, i did:
1. increased the sigma-delta to 64.
2. used 16 for pre fir and rest (=4) for the cic
Please share your insight. the changed script is attached. tst_pdm.m
I tried running your code... i don't have thd(-,-)
Strange as it seems, try changing the frequency of the fundamental so it is no longer harmonically related to the clock. I think the distortion is a quirk of a the harmonic lock.
try changing your f1 from 1000 to 1001.
and run your system again... alternately add a low level (-100 db) random noise to your xx sequence. the frequency change is simpler.
let me know if this helps... I run into this problem when I want to demo quantizing noise... when the frequency is harmonically related to sampling clock, the quantizing noise is periodic... you want to avoid this effect by the two options I suggested.
Thanks Fred for further tips. I changed the freq from 1k to 1001. and added low amp white noise. the modified thd is attached.
A) top left - with cic
B) right - with fir
C) bottom - hybrid (fir + cic)
I was expecting B to be better than A, and C.
last comment... don't use full amplitude in sigma-delta ... scale input to be less than 1 as shownx = 0.9*sin(1*pi*[-n:1:n]*(f1/fs));
Nice plots Fred. This particular plot gives a feel that fir is superior to cic. As a homework, the number of sample used for my computation and computation and the THD routine need to be checked against this results.
Thanks for all your insights and tips. Once again thanks for the paper - very relevant to industry !
Thanks again Fred. It gave 3.5dB improvement in THD; still behind. Please see the attached plots. the right bottom is the frf version, rest are the same...
the changed script is attached. please crosscheck usage of frf. tst_pdm.m
I have spent a fair amount of time with your code so i feel ok making some other suggestions
get rid of the window on the data... you want the window in the transform
%x1 = 0.8*hann(length(x)).*x';
x1=x+0.001*randn(1,length(x)); % instead
Apply window this way...
axis([-fs/2 fs/2 -120,10])
axis([-fs/2 fs/2 -120,10])
Finally, try running this take home exam problem solution... 3-rd order sigma_delta