Strong low-pass filter

I want to make a low-pass filter (-0.1 dB/20kHz, -150dB/22050Hz) for digital audio 44.1...192kHz (from S/PDIF). What use for this ? DSP processor OR FPGA OR something other? What is the easiest way to do this?

Thanks in advance Pawel

Reply to
pw
Loading thread data ...

Could you tell the difference between -130db and -150db?

Mikek

Reply to
amdx

You should be able to implement this on a DSP chip. You could certainly implement it on an FPGA. So you're pretty much free to choose which one you want.

You're asking for an exceedingly steep response, which means you're going to get a lot of ringing on transients.

--
Tim Wescott 
Control system and signal processing consulting 
 Click to see the full signature
Reply to
Tim Wescott

If you want -130, it might be the -130.

Reply to
pw

Doesn't such an application require an analog filter? ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

Please for more details. Which DSP have free CAD software available for the PC? I checked VisualDSP++ - it is not free.

The problem is that probably all digital filters in the audio DAC's are full stop-band attenuation at ~0.54fs. In the 0.5 ... 0.54fs suppression is not full and aliasing occur. I want to avoid this by the use of low pass filter prior. If this is a bad solution - how resolve this different?

Reply to
pw

Hmm. I'm trying to decide if I'm suffering from unthinkitis today or not.

For the cost of digital hardware these days, upsampling internally, filtering, then converting to analog and having a relaxed requirement on the reconstruction filter would probably make it much easier to build quality equipment at a lower price.

(Or, if you're recording instead of playing back, turning everything around, but still sampling fast at the ADC).

((Which is part of the allure of sigma-delta converters))

But obviously if you're sampling at 44.1kHz then any reconstruction or anti-aliasing is going to happen in analog-land.

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
 Click to see the full signature
Reply to
Tim Wescott

That's one tough filter spec. It'll need a lot of taps and a lot of bits, too. What on earth would actually need a spec like that?

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

I don't have a clue. And if you expect a free tool to do this job for you I think you'll be disappointed.

Does the digital audio stream contain any significant content at 0.46-0.5 fs? If not, then your aliasing is taken care of before the audio hits the DAC.

I think you want to get across a forest, and you've run into a tree. Now you're asking us how to chop a hole in the tree so you can proceed.

Maybe if you tell us what you have and what you want to achieve, we can help you find a path to success that doesn't involve building impossible filters (or chopping holes through trees).

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
 Click to see the full signature
Reply to
Tim Wescott

Be careful what you wish for - a brick wall filter has a horrible transient response. You might be better off using a notch reject filter to remove the 22.05kHz birdie and a much softer low pass filter.

--
Regards, 
Martin Brown
Reply to
Martin Brown

An audiophool. But you could probably approach -60dB with an analog filter with stop-band zeroes. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

Hmm I think it's 20dB :^)

George H.

Reply to
George Herold

y
e

Great! I was waiting for your reply. Even with digital techniques you can't get around causality. (The Kramers-Kronig relations) Can you really make such a sharp filter... Mostly I'd just want to hit it with a step and see the response.

George H.

Reply to
George Herold

I checked - the content is to 0.5fs. In VLC and Foobar (with PPHS resampler 44.1-->48 in ultra mode) is strong low-pass filter. I want to reproduce similar filter on the DSP or otherwise.

Reply to
pw

That last 20dB might well make the difference here between an algorithm that could be implemented in 32bit arithmetic realistically and something that can't. Sounds decidedly like audiophool stuff to me.

--
Regards, 
Martin Brown
Reply to
Martin Brown

Meeting his specifications with some honkin' big FPGA would be a snap; with a bit of shoe-horning one could probably make it work with one of the new fixed-point DSP chips.

The problem comes about when you want to reproduce this sound in the real world. -150dB down from 1V p-p is about 32nV. Where are you going to find a DAC, or even an analog audio chain, that's not going to bury all of your filtering efforts in noise and distortion that's much bigger than that?

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
 Click to see the full signature
Reply to
Tim Wescott

On a sunny day (Thu, 14 Feb 2013 16:14:30 +0100) it happened pw wrote in :

Brick wall can be done by doing forward FFT, setting everything above 20 kHz to zero in the frequency domain, and then doing a reverse FFT. It is almost as simple as that, but not quite. I have done it for video... There are several free filter design programs on the web that you can play with.

Reply to
Jan Panteltje

If you did that, what would the phase plot look like in the passband? Amplitude is only part of the problem with most applications???

Reply to
mike

Specifying such a sharp filter in a CAD tool like Scilab or Matlab is a fairly direct process, either for an IIR or an FIR.

Implementing such a sharp filter in an algorithm for a DSP chip or an FPGA is straightforward but tedious as long as you take care not to step into the pitfall of not using enough precision (-150dB implies 25 bits of precision: you could probably get away with a 32-bit data path in an FIR filter, but you'd probably need to double that for an IIR).

Actually having a signal chain that's good to 25 bits at the top end of its frequency range is a dubious proposition at best. I'm not saying it can't be done -- just that it would take a lot of effort, and since we're talking about sound reproduction, that effort would have to be expended at every step of the way.

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
 Click to see the full signature
Reply to
Tim Wescott

That's funny. When I told some physicists here that to equalize the frequency response of two instruments here they just had to filter the signal a bit after A-to-D conversion, with a pole here and a zero there, that's exactly what they did. No need to mention that the response was so horrible that the results were useless. And it was _slow_ besides.

I came up with an IIR filter that did it in three lines of code and on the fly, and with the right phase response too. Oh well.

Jeroen Belleman

Reply to
Jeroen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.