DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

DC Blocker

Started by b2508 ●October 22, 2015
"b2508" <108118@DSPRelated> writes:

> Hi all, > > I am trying to implement this DC blocker in FPGA. > > http://www.digitalsignallabs.com/dcblock.pdf > > However, my signal after it is significantly reduced in amplitude. What is > the best way to cope with this? Also, do I need to use DSP48 block (xilinx > FPGA) for this multiplication with pole? > > Thank you.
I'm a bit late to the game here, but I'll go ahead and proceed. First of all, which DC block algorithm are you using from that paper? There are two techniques, one is the leaky integrator with z-transform H(z) given by equation 3; the other is the linear phase moving averager with z-transform H_{MA}(z) given by equation 6. If you are using the leaky integrator, what value are you using for P and what frequency are you measuring the amplitude at? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
radams2000@gmail.com writes:

> Unless you are really constrained in terms of gate count I would > recommend using full double precision in the recursive section. It's > only slightly more expensive than noise-shaping and you won't have > troubles with idle tones from the noise-shaping. Idle tones have a > nasty way of only being detected by your customers after you are > shipping product.
Bob, This double-precision idea sounds interesting, but I don't exactly understand it. Could you please post something that clearly defines where the 32-bit and 16-bit paths are and where the quantization takes place (assuming the output y[n] is also 16 bits)? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Try this:

https://www.dropbox.com/s/8jqky3bg259qecg/doubleP.pptx?dl=0

There's a minor problem with all the solutions so far in that the wordlength of the  differentiator output needs to grow by 1 bit for the case of a full-scale signal near Nyquist.




On Sunday, October 25, 2015 at 11:56:12 PM UTC-4, Randy Yates wrote:
> radams2000@gmail.com writes: > > > Unless you are really constrained in terms of gate count I would > > recommend using full double precision in the recursive section. It's > > only slightly more expensive than noise-shaping and you won't have > > troubles with idle tones from the noise-shaping. Idle tones have a > > nasty way of only being detected by your customers after you are > > shipping product. > > Bob, > > This double-precision idea sounds interesting, but I don't exactly > understand it. Could you please post something that clearly defines > where the 32-bit and 16-bit paths are and where the quantization takes
> place (assuming the output y[n] is also 16 bits)? > -- > Randy Yates > Digital Signal Labs > http://www.digitalsignallabs.com
radams2000@gmail.com writes:

> Try this: > > https://www.dropbox.com/s/8jqky3bg259qecg/doubleP.pptx?dl=0
Hey, thanks for that, Bob. I guess those two multiplies by p implement a 16x32->32 multiply? And obviously you leave it up to the consumer to requantize the output if desired. As I see it, if the input signal is scaled A(a,b) then the 32-bit output is A(a, b+16), i.e., take the upper 16 bits of the output (in some fashion) to get back to 16 bits?
> There's a minor problem with all the solutions so far in that the > wordlength of the differentiator output needs to grow by 1 bit for > the case of a full-scale signal near Nyquist.
That's correct. What's more, from the z-transform of the entire filter (differentiator and leaky integrator), the analytic gain at Nyquist is 2 / (1 + p), so when p < 1, you get a gain > 1, so that you must either a) overflow, b) saturate, c) rescale the output or d) "adjust" somewhere in a node in the implementation (e.g., overflowing the differentiator). --Randy
> > > > > On Sunday, October 25, 2015 at 11:56:12 PM UTC-4, Randy Yates wrote: >> radams2000@gmail.com writes: >> >> > Unless you are really constrained in terms of gate count I would >> > recommend using full double precision in the recursive section. It's >> > only slightly more expensive than noise-shaping and you won't have >> > troubles with idle tones from the noise-shaping. Idle tones have a >> > nasty way of only being detected by your customers after you are >> > shipping product. >> >> Bob, >> >> This double-precision idea sounds interesting, but I don't exactly >> understand it. Could you please post something that clearly defines >> where the 32-bit and 16-bit paths are and where the quantization takes > >> place (assuming the output y[n] is also 16 bits)? >> -- >> Randy Yates >> Digital Signal Labs >> http://www.digitalsignallabs.com
-- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Randy

I was assuming a 16x16 -> 32 multiplier, unless you need more coefficient precision. In reality when you implement this you will need a few extra bits on top to accommodate overshoots without clipping or wrapping so it's not quite as simple as shown. 

Yes I was assuming you keep as many bits as you need on the output. 

But my general comment is that digital logic density is so absurdly high now that many of the tricks we used to play in the 80's and 90's are just not worth it anymore. The days when you would get a medal by eliminating a multiply operation are over. 

Bob
On Wed, 28 Oct 2015 04:50:06 -0700 (PDT), radams2000@gmail.com wrote:

>Randy > >I was assuming a 16x16 -> 32 multiplier, unless you need more coefficient precision. In reality when you implement this you will need a few extra bits on top to accommodate overshoots without clipping or wrapping so it's not quite as simple as shown. > >Yes I was assuming you keep as many bits as you need on the output. > >But my general comment is that digital logic density is so absurdly high now that many of the tricks we used to play in the 80's and 90's are just not worth it anymore. The days when you would get a medal by eliminating a multiply operation are over.
It's definitely a different world now. However, doing things with small, embedded processors is back in vogue for some applications, and that's restoring some need for talent in efficiency. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
>On Wed, 28 Oct 2015 04:50:06 -0700 (PDT), radams2000@gmail.com wrote: > >>Randy >> >>I was assuming a 16x16 -> 32 multiplier, unless you need more
coefficient
>precision. In reality when you implement this you will need a few extra
bits
>on top to accommodate overshoots without clipping or wrapping so it's
not
>quite as simple as shown. >> >>Yes I was assuming you keep as many bits as you need on the output. >> >>But my general comment is that digital logic density is so absurdly
high
>now that many of the tricks we used to play in the 80's and 90's are
just
>not worth it anymore. The days when you would get a medal by eliminating
a
>multiply operation are over. > >It's definitely a different world now. > >However, doing things with small, embedded processors is back in vogue >for some applications, and that's restoring some need for talent in >efficiency. > > > >Eric Jacobsen >Anchor Hill Communications >http://www.anchorhill.com
I miss the old world :) A single person could actually get a medal, whereas now you need a team of 35 engineers to design 1/10th of a standard SOC. --------------------------------------- Posted through http://www.DSPRelated.com
radams2000@gmail.com writes:

> Randy > > I was assuming a 16x16 -> 32 multiplier, unless you need more > coefficient precision.
I can't see how these two 16x16 multipliers make one 16x16 -> 32 multiplier.
> In reality when you implement this you will > need a few extra bits on top to accommodate overshoots without > clipping or wrapping so it's not quite as simple as shown. > > Yes I was assuming you keep as many bits as you need on the output. > > But my general comment is that digital logic density is so absurdly > high now that many of the tricks we used to play in the 80's and 90's > are just not worth it anymore. The days when you would get a medal by > eliminating a multiply operation are over.
That may be true in the FPGA realm, and 90 percent true for DSPs, but there's always some idiot trying to do some algorithm insanely fast on DSPs... -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On 10/29/2015 1:33 AM, Randy Yates wrote:
> radams2000@gmail.com writes: > >> Randy >> >> I was assuming a 16x16 -> 32 multiplier, unless you need more >> coefficient precision. > > I can't see how these two 16x16 multipliers make one 16x16 -> 32 > multiplier.
Is this a typo? Or did you mean "one 16x32 -> 32 multiplier"? That would take just two multipliers and one adder.
>> In reality when you implement this you will >> need a few extra bits on top to accommodate overshoots without >> clipping or wrapping so it's not quite as simple as shown. >> >> Yes I was assuming you keep as many bits as you need on the output. >> >> But my general comment is that digital logic density is so absurdly >> high now that many of the tricks we used to play in the 80's and 90's >> are just not worth it anymore. The days when you would get a medal by >> eliminating a multiply operation are over. > > That may be true in the FPGA realm, and 90 percent true for DSPs, but > there's always some idiot trying to do some algorithm insanely fast on > DSPs...
It all depends on your constraints. I did some work in low end FPGAs where multipliers are not part of the fabric. In one case I used the synthesis tools to give me an 8x8 multiplier at the full LUT cost. Later on an upgrade I had to add an 8x16 multiplier and did it word serially to save on the LUTs. But then the device was getting full. There were tricks I used so I didn't have to use multipliers in other cases... other than multiplying by -1. -- Rick
Randy

You can decompose one 32x16 into two 16x16 by splitting the input bus into an upper and lower range. The results can both be scaled and accumulated in a single register. I omitted the shift operation that you need to do before accumulating the lower bits, sorry. I am assuming the coefficients are still 26 bits, but this depends on the filter characteristics. 

I also agree that there are cases where shaving mips is still a big deal, but for a large number of cases you would need a very good microscope to even see a multiplier. In 28nm you could probably fit 20 of them underneath a bond pad. 

Bob