From: robert bristow-johnson on
in article d9eedv$lt1$1(a)nnews.pacific.net.hk, Steve Underwood at
steveu(a)dis.org wrote on 06/23/2005 09:39:

> ytregubov(a)yahoo.com wrote:
>> Use highpass filter.
>>
>> Regards,
>> Yuri
>>
> That's a really bad idea. A filter cutting off very low in the band is
> not nice. Estimating the DC and subtracting it is the right approach.

but Steve, if it's a continuous running real-time system, how do you
continuously estimate DC? only way i know is with a LPF. then when you
take the "DC" output of the LPF and subtract it from the input signal, what
functionally have is an HPF.

now there are many different HPFs with different orders and cutoff
frequencies and filter shape, etc. but essentially, when you do DC
blocking, you're doing HPFing.

--

r b-j rbj(a)audioimagination.com

"Imagination is more important than knowledge."


From: Tim Wescott on
shridhar(a)mistralsoftware.com wrote:
> Hi,
>
> we are reading an ADC o/p through FPGA. To remove the DC Offset present
> in the ADC input we have a DAC which can remove this DC offset using a
> subtractor before the actual analog input (with added DC offset) goes
> to ADC.
>
> Now I want my FPGA to calculate the DC offset from ADC outputs and then
> feed this value to DAC input which in turn cancel the DC offset using
> subtrator.
>
> can anybody suggest me how can i implement this in FPGA? I just gone
> through net and realized that i can use a subtractor and a MAC. The ADC
> output will go to this Subtractor which has the final output of MAC as
> other input. the subtractor output will be multiplied with some small
> value K (??) and then an accumulator. The final output of accumulator
> can be feedback to the DAC. The DAC o/p is going to Mixer to cancel the
> DC offset?
>
> this is what i understood. can somebody through some light?
>
> suggestions are welcome.
>
You simply need to integrate the ADC reading and apply the integrated
and scaled answer back to the DAC. As long as the ADC value does not
average out to zero it's integral will climb or descend, which will keep
changing the command to the DAC. When the ADC value _does_ average to
zero then the DAC command will cease changing.

As Dave Coffey mentioned you don't even need to do an explicit
multiplication -- you can just use shifts. Your biggest challenge will
be verifying just how slowly you want to remove DC offet, and scaling
your shift appropriately. I suspect you want to set the shift to be
larger than the bit count of the ADC, and probably significantly more,
to avoid the LSB of the DAC moving around -- but that's your call.

So make a register that's big enough, and whenever you sample your ADC
add it's value (appropriately sign extended, of course) to the ADC, then
apply a shifted version to the DAC:

// Note this is verilog, more or less
DacValue <= register >> `DAC_SHIFT; // Scale the output
register <= register + AdcValue; // capture all the input

As written there's a one-cycle delay in the writing of the DAC value --
this should have a negligible impact on the process because it's so
slow. In fact you should be able to pipeline this to a great extent,
because you want to have a very slow process which implies a great
tolerance for delay.

--
-------------------------------------------
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
From: Steve Underwood on
robert bristow-johnson wrote:
> in article d9eedv$lt1$1(a)nnews.pacific.net.hk, Steve Underwood at
> steveu(a)dis.org wrote on 06/23/2005 09:39:
>
>
>>ytregubov(a)yahoo.com wrote:
>>
>>>Use highpass filter.
>>>
>>>Regards,
>>>Yuri
>>>
>>
>>That's a really bad idea. A filter cutting off very low in the band is
>>not nice. Estimating the DC and subtracting it is the right approach.
>
>
> but Steve, if it's a continuous running real-time system, how do you
> continuously estimate DC? only way i know is with a LPF. then when you
> take the "DC" output of the LPF and subtract it from the input signal, what
> functionally have is an HPF.
>
> now there are many different HPFs with different orders and cutoff
> frequencies and filter shape, etc. but essentially, when you do DC
> blocking, you're doing HPFing.
>
Sure. A low pass filter and subtraction gives a high pass filter.
However, when someone says use a high pass filter, and the previous post
talked about subtracting a DC estimate, I rather think they mean a
direct HPF implementation.

Regards,
Steve
From: robert bristow-johnson on
in article d9eqq5$5b2$1(a)nnews.pacific.net.hk, Steve Underwood at
steveu(a)dis.org wrote on 06/23/2005 13:11:

> robert bristow-johnson wrote:
>> in article d9eedv$lt1$1(a)nnews.pacific.net.hk, Steve Underwood at
>> steveu(a)dis.org wrote on 06/23/2005 09:39:
>>
>>
>>> ytregubov(a)yahoo.com wrote:
>>>
>>>> Use highpass filter.
>>>>
>>>> Regards,
>>>> Yuri
>>>>
>>>
>>> That's a really bad idea. A filter cutting off very low in the band is
>>> not nice. Estimating the DC and subtracting it is the right approach.
>>
>>
>> but Steve, if it's a continuous running real-time system, how do you
>> continuously estimate DC? only way i know is with a LPF. then when you
>> take the "DC" output of the LPF and subtract it from the input signal, what
>> functionally have is an HPF.
>>
>> now there are many different HPFs with different orders and cutoff
>> frequencies and filter shape, etc. but essentially, when you do DC
>> blocking, you're doing HPFing.
>>
> Sure. A low pass filter and subtraction gives a high pass filter.
> However, when someone says use a high pass filter, and the previous post
> talked about subtracting a DC estimate, I rather think they mean a
> direct HPF implementation.

so now i beg the question: so what? what's the difference?

if they use an LPF to get the DC and subtract that "DC" from the signal,
they have an HPF which would perform identically to the "direct HPF
implementation" so designed. same H(z) in both cases.

--

r b-j rbj(a)audioimagination.com

"Imagination is more important than knowledge."


From: Matt Timmermans on

"robert bristow-johnson" <rbj(a)audioimagination.com> wrote in message
news:BEE0C183.8824%rbj(a)audioimagination.com...
> so now i beg the question: so what? what's the difference?

It's the difference between a stop-band and a notch.

--
Matt


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: SHARC debug
Next: Who Invented the Z Transform