+ Post New Thread
Results 1 to 13 of 13

22nd March 2012, 12:22 #1
 Join Date
 Oct 2011
 Posts
 23
 Helped
 1 / 1
 Points
 290
 Level
 3
Designing CIC for delta sigma modulator
Hi all!
I am trying to design a simple CIC decimation filter for my first order delta sigma modulator. Oversampling is 1024 and output is 1 bit. I tried to go with the standard theory for design. It gives 11 bits for 1st integrator, and 21 for the next. I am amazed over the fact that how can a 21 bit output be obtained when the modulator itself does not have such a high resolution? I mean... the modulator resolution itself is less than 12 bit. How can one extract a 21 bit output?
Please clarify. I am suspecting that some of the bit patterns at the output may be random in such a case.
Thanks in advance!

Advertisment

23rd March 2012, 17:47 #2
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 43,802
 Helped
 13318 / 13318
 Points
 251,535
 Level
 100
Re: Designing CIC for delta sigma modulator
For a better understanding of your design, you should tell the full specification of your CIC decimator. The width of individual integrator stages is commanded by the output width, CIC order and decimation factor. It doesn't necessarily imply that all bits are significant. Some bits may be also omitted by applying Hogenauer's pruning theory.
I don't think, that insignificant CIC bits are random. They'll rather show patterns depending on the input sequence. But for a randomly varied input, they can be expected to be randomized as well.
1 members found this post helpful.

24th March 2012, 06:36 #3
 Join Date
 Feb 2012
 Location
 L.A. USA Zulu 8
 Posts
 3,562
 Helped
 839 / 839
 Points
 18,360
 Level
 32
Re: Designing CIC for delta sigma modulator
Delta sigma modulation gains resolution by averaging many coarse samples. It's similar to averaging a noisy signal to increase the signal to noise ratio. The more samples you average, the better the signal to noise and thus the better the resolution.
Zapper
Curmudgeon Elektroniker

27th March 2012, 02:52 #4
 Join Date
 Oct 2011
 Posts
 23
 Helped
 1 / 1
 Points
 290
 Level
 3
Re: Designing CIC for delta sigma modulator
Thanks FvM. Sorry I was out for the weekend so couldn't reply. Here it goes.
I wish to have a CIC for a DSM with OSR = 1024, bandwidth 500 Hz, first order, single bit. I planned a second order CIC, but the no. of output bits seem to be rising beyond the DSM resolution. Please help me understand this. Let me know if some more info is reqd.
thanks,
dushyant.
 Post added at 07:22  Previous post was at 07:20 
Thanks crutschow for the reply. So the no. of averaging bits are fixed here. 1024. Now, it should still not give such a high resolution. bit puzzled...

27th March 2012, 06:45 #5
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 43,802
 Helped
 13318 / 13318
 Points
 251,535
 Level
 100
Re: Designing CIC for delta sigma modulator
You didn't tell the number of output bits.

Advertisment

27th March 2012, 12:16 #6
 Join Date
 Oct 2011
 Posts
 23
 Helped
 1 / 1
 Points
 290
 Level
 3
Re: Designing CIC for delta sigma modulator
Thanks. So here you go.
For a 1024 OSR, output freq is 500 Hz, and each integrator needs bit increment of 10 bits. So input bits is 1, after first integrator it goes to 11, second one gives 21 bit output. And this goes through differentiators to get a 21 bit output. I am surprised because the DSM itself does not have such a high resolution output.
Hope it clarified my question.
thanks for your interest.
dushyant.

Advertisment

27th March 2012, 14:34 #7
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 43,802
 Helped
 13318 / 13318
 Points
 251,535
 Level
 100
Re: Designing CIC for delta sigma modulator
For a 1024 OSR, output freq is 500 Hz, and each integrator needs bit increment of 10 bits. So input bits is 1, after first integrator it goes to 11, second one gives 21 bit output.
I get e.g. these parameters for a 16 Bit output second order CIC. The additional output bit is provided for rounding purposes.
Code: Stage 1 INTEGRATOR. Bit width : 21  Stage 2 INTEGRATOR. Bit width : 21  Stage 1 COMB. Bit width : 18  Stage 2 COMB. Bit width : 17
Last edited by FvM; 27th March 2012 at 16:40.
1 members found this post helpful.

27th March 2012, 16:49 #8
 Join Date
 Oct 2011
 Posts
 23
 Helped
 1 / 1
 Points
 290
 Level
 3

27th March 2012, 17:04 #9
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 43,802
 Helped
 13318 / 13318
 Points
 251,535
 Level
 100
Re: Designing CIC for delta sigma modulator
Could you tell me how you reduced the bits from the second stage to the third and fourth ones? IS there some mathematics involved?
1 members found this post helpful.

13th April 2012, 11:42 #10
 Join Date
 Oct 2011
 Posts
 23
 Helped
 1 / 1
 Points
 290
 Level
 3
Re: Designing CIC for delta sigma modulator
Ok...got it. Thank you so much FvM. Took me some time to do all the literature study and understand your comments.
One more question. For a second order modulator, there are two integrators. Each integrator with above mentioned oversampling should give rise of 10 bits. How can we have first two integrators of 21 bits, both? I am asking because I saw this at various other implementations also.
Awaiting response.
juneja

Advertisment

13th April 2012, 12:58 #11
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 43,802
 Helped
 13318 / 13318
 Points
 251,535
 Level
 100
Re: Designing CIC for delta sigma modulator
Hogenauer is giving this mathematical explanation for it:
Not only is Bmax the MSB at the filter output, but it is also the MSB of all stages of the filter. This can be shown by applying modulo arithmetic to the filter output function. For two's complement arithmetic, the modulo operation can be implemented by simply eliminating bit positions above Bmax.
Since the modulo operation is used at the filter output, the same modulo operation can be applied independently to each integrator and comb stage. This implies that Bmax is an upper bound for each filter stage.
It is now shown that Bmax is also a lower bound. Since the first N stages of the filter are integrators with unity feedback, it is apparent that the variance of the integrators outputs grow without bound for uncorrelated input data. As seen at the output register, Bmax is the MSB for each integrator since this as a significant bit and is the highest order bit that can propagate into the output register. Since a propagation path must be provided through the comb section for this MSB, it can be be concluded the Bmax must be the MSB not only for the integrators, but also for the combs that follow.
1 members found this post helpful.

20th April 2012, 14:54 #12
 Join Date
 Oct 2011
 Posts
 23
 Helped
 1 / 1
 Points
 290
 Level
 3
Re: Designing CIC for delta sigma modulator
Thanks a lot FvM.
That clarified much of my doubts. So here is the program I made for that. Its implemented on a 32 bit machine. So output is kept to be 32 bits. oversampling is kept to be 64 only right now for debugging. The problem is that the code is working, but giving strange outputs. Could you please help me with this? I am taking inputs by changing the value of variable "in" in the code. A constant zero value for "in" means minimum input to the modulator. The corresponding value at the output should hence be all zeroes. Similarly, a constant "1" for in corresponds to highest inputs, and should give a high on all pins (I suppose). The outputs I am getting, however, are like this:
Code:For in=0: comb2=0x0000 0000; (correct to expectations) For in=1: comb2=0x0000 1000; (expected 0xFFFF FFFF instead)
The code follows next:
Code:while(1) { for (n1=0;n1<64;n1++) { //if (in==1) //{in=0;} //else //{in=1;} //First integrator integrator1=integrator1+in; // y(n)=x(n)+y(n1) integrator2=integrator2+integrator1; // z(n)=y(n)+z(n1) } // end for // Start low speed operations here. comb1=integrator2last_integrator2; // First differentiation // v(n)=z(n)+z(n1)'+1 // First differentiation over comb2=comb1last_comb1; // w(n)=v(n)+v(n1)'+1 // Second differentiation over last_integrator2=integrator2; last_comb1=comb1; }

21st April 2012, 00:05 #13
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 43,802
 Helped
 13318 / 13318
 Points
 251,535
 Level
 100
Re: Designing CIC for delta sigma modulator
Your test is different form the original scenario in several regards.
 OSR of 64 iinsteas of 1024
 no truncation to the correct bitwidth
 numbers should be interpreted as two's complement
To understand the transfer function of the implemented filter, you should vary the average value of in continuosly over the range 0..1
P.S.:
To add a simple point. The OSR can be understood as a gain factor. So a second order CIC with OSR=64 has a gain of 64^2. When using an unsigned number representation, and no additional carry presets, input values 0 and 1 are mapped to 4096 (0x1000) and 0 respectively. Having additional bits above the MSB isn't a problem, it's sufficient to cut them at the output.
The classical CIC scheme introduced by Hogenauer uses signed number representation and some special tricks with carry bits to map the input data to the intended output number range without saturaton logic. If you want to reproduce it exactly, you need to study Hogenauers original paper.
Or use your own number representaion, e.g. unsigned as in your test. Then you should evaluate the it's behavior in a test.Last edited by FvM; 21st April 2012 at 09:55.
+ Post New Thread
Please login