Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CIC Filter Truncation

sprite_emi

Newbie level 5
Newbie level 5
Joined
Nov 24, 2022
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
70
I have read some of posts about CIC Filter truncation in those threads and have received great help. Thank you very much. But now I have encountered a problem in dealing with CIC Filter truncation. This problem has been plaguing me for nearly two months.
I wish to design a CIC filter for my modulator. This filter should have an output bit width of 16 bits and can achieve an effective number of bits (ENOB) of nearly 16 bits.

I designed a CIC filter with a variable OSR (from 256 to 16384) for an SD ADC. N = 3 and M = 1.
Taking OSR = 512 as an example: I set up the model with Simulink. The output ENOB of the SD ADC Modulator is 17.78 bits. When I perform FFT on the output using an untruncated CIC filter (Bmax = 28), the ENOB is 18.36 bits. However, when I use Hogenauer's truncation theory and perform FFT on the 16-bit output, I can only obtain an ENOB of 14 bits.
For the 18-bit (output of Comb3), I can obtain an ENOB of 16 bits. Looking at the FFT diagram with ENOB = 14 bits, its dc component becomes larger and reduces the ENOB.

How can I obtain a truncated CIC filter with an output bit width of 16 bits? The effective number of bits (ENOB) can be close to 16 bits when the signal passes through the filter.
 
I suggest you directly check the bits and max/min values for your input range. This could be done at output of each stage. You can then decide LSBs to be discarded (with rounding) and MSBs to be discarded (with minimum clipping).
 
I don't exactly understand what the problem is. Hogenauer pruning scheme is straightforward, number of discarded LSB depends however on assumptions about signal noise spectrum. Either your decimator isn't implemented correctly or signal spectrum is unusual.

It's also not completely clear what your test setup is.

If the only problem is that standard Hogenauer scheme is cutting bits too aggressive, you can try to add extra LSB.

CIC decimator has only smooth cutoff, is it guaranteed that no out-off-band components are aliasing into the base band? According to my experience, optimal decimators can be better implemented with general FIR filters, at cost of using more DSP and RAM and getting higher group delay.
 
Last edited:
Additional question, I don't understand how a DC component is generated in your CIC. Also it shouldn't count for ENOB, I think. You can try to use rounding in the last stage.
 
Register widths for the discussed CIC with 1 bit input are
Code:
CIC register widths
1: 28
2: 28
3: 24
4: 20
5: 19
6: 18
Rounding output from register[6] is just obvious.
 
Additional question, I don't understand how a DC component is generated in your CIC. Also it shouldn't count for ENOB, I think. You can try to use rounding in the last stage.
Thanks very much for your reply.
Using the last Comb output of 18 directly, I obtain an ENOB of 16.25 with a small dc component. However, when I use the way of truncation to deal with the output from 18 to 16, I only obtain an ENOB of 14.33. It has a larger dc component. When I use the way of rounding to deal with the output from 18 to 16, I only obtain an ENOB of 14.8. It also has a dc component. I understand that when I use the way of truncation to deal with the last comb output, there must be dc component. However, why does the rounding method also result in a dc component?
1724471188307.png
1724471207014.png
1724471213580.png
 
I won't care for small DC offset because it's typically far below real SD modulator offset and removed in overall system calibration.
To understand the problem nature, you should check DC offset in actual LSB units. Could be a problem of signed/unsigned 16 Bit full scale. May be you are expecting accuracy beyond available resolution?
 
I suggest you directly check the bits and max/min values for your input range. This could be done at output of each stage. You can then decide LSBs to be discarded (with rounding) and MSBs to be discarded (with minimum clipping).
Thanks very much for your reply.
I have understood it. But when I use the rounding method, a dc component appears. The figures are as #6.
--- Updated ---

I won't care for small DC offset because it's typically far below real SD modulator offset and removed in overall system calibration.
To understand the problem nature, you should check DC offset in actual LSB units. Could be a problem of signed/unsigned 16 Bit full scale. May be you are expecting accuracy beyond available resolution?
Thanks very much for your reply.
Sorry, i can not understand 'check DC offset in actual LSB units'. i accumulate 512 pieces of data to evaluate the dc component as shown in the following figure.
1724482600775.png

Shouldn't the smaller accumulated value correspond to the smaller a dc component? Is my thinking wrong?
I operate in my circuit using the binary complement with signed (fixdt(1, B)). For the input with an ENOB exceeding 16 bits, I want to obtain the output with an ENOB of 16 bits by the CIC filter.
 
Last edited:
Thanks very much for your reply.
I have understood it. But when I use the rounding method, a dc component appears. The figures are as #6.
--- Updated ---


Thanks very much for your reply.
Sorry, i can not understand 'check DC offset in actual LSB units'. i accumulate 512 pieces of data to evaluate the dc component as shown in the following figure.
View attachment 193294
Shouldn't the smaller accumulated value correspond to the smaller a dc component? Is my thinking wrong?
I operate in my circuit using the binary complement with signed (fixdt(1, B)). For the input with an ENOB exceeding 16 bits, I want to obtain the output with an ENOB of 16 bits by the CIC filter.
Your table shows something slightly wrong at sample 515 at both truncation and rounding.
The values of no-truncation should be divided by 4 to get other columns.
 
Your table shows something slightly wrong at sample 515 at both truncation and rounding.
The values of no-truncation should be divided by 4 to get other columns.
yes, sorry, i forget it. but it is also incorrect. Because the sum of ideal modulator output is 0.
1724484943527.png
 
yes, sorry, i forget it. but it is also incorrect. Because the sum of ideal modulator output is 0.
View attachment 193296

Your rounding shows mismatch as below:
x=[-67301,-67174]

floor(x/4) = -16826 -16794 (truncation)

round(x/4) = -16825 -16794 (rounding)

what rounding method do you use?
 
Last edited:
Your rounding shows mismatch as below:
x=[-67301,-67174]

floor(x/4) = -16826 -16794 (truncation)

round(x/4) = -16825 -16794 (rounding)

what rounding method do you use?
I have also noticed this problem. I employed the method of round(P1/4). But the 512th data is equal to -16793 by round(P1/4), perhaps it is due to the data type.

When I use double(P1) before rounding, the data is correct. However, there is a minor influence on the ENOB.
1724499512342.png
1724499516615.png
 
The dc level is very low @ -110dB
For better ENOB you may try truncating one lsb or none if MSBs allow i.e. if MSBs are unused or clip peaks.
 
The dc level is very low @ -110dB
For better ENOB you may try truncating one lsb or none if MSBs allow i.e. if MSBs are unused or clip peaks.
Thanks very much for your patient reply.
I have checked the binary complement. The MSB is used. However, I only need the output of 16bits, not an 18 bit width.
 
I know you are targeting 16 bits. I suggested if you can give up on MSB side instead of truncating LSBs.
LSBs represent fine information of any signal. MSBS are also needed but it is sometimes possible to clip those occasional peaks onto 16 bits final output. For example you may remove one LSB and one MSB or leave the two LSBs but remove two MSBs.
clipping MSBs will have some effect (non-linear) but could be tolerated.
 
I know you are targeting 16 bits. I suggested if you can give up on MSB side instead of truncating LSBs.
LSBs represent fine information of any signal. MSBS are also needed but it is sometimes possible to clip those occasional peaks onto 16 bits final output. For example you may remove one LSB and one MSB or leave the two LSBs but remove two MSBs.
clipping MSBs will have some effect (non-linear) but could be tolerated.
I am sorry to reply to your post late.
I have observed the binary from MSB to LSB, and found that the information stored in all binaries. When I try to truncate the MSB or the sub-MSB, the FFT has a significant 3-harmonic like the figure below.
1724724904252.png
 
MSB can't be truncated in CIC by operation principle. Refer to original Hogenauer paper or textbook explaining CIC operation in case of doubt.
 
MSB can't be truncated in CIC by operation principle. Refer to original Hogenauer paper or textbook explaining CIC operation in case of doubt.
Yes, it is indeed the MSB that can not be truncated. However, I can't understand why the ENOB decreases due to the dc component after being truncated from LSB by rounding. o_O
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top