Reply by November 24, 20152015-11-24
How long is the FIR you get to use?

Have you already tried sampling the analog impulse response and using those as FIR coefficients ? If so how much error did you see in the frequency response ?

Bob
Reply by b2508 November 23, 20152015-11-23
>An fir version is a different story, you'll definitely want to use an >optimizer for that. But if your hardware can do either IIR or FIR I don't
know
>why you wouldn't choose IIR. > >Bob
Can someone, please, explain what kind of optimizer? Using already existing FIR is the only option. Do others agree that I can use IIR impulse response simulated in some software as FIR filter coefficients? I am just trying to find the easiest and quickest method that does not require learning some completely new concepts. How do I know if phase matters? I am trying to demodulate audio signal. Thank you very much for your answers on how to resolve this problem. --------------------------------------- Posted through http://www.DSPRelated.com
Reply by glen herrmannsfeldt November 21, 20152015-11-21
Steve Pope <spope33@speedymail.org> wrote:
> Randy Yates <yates@digitalsignallabs.com> wrote:
>>I've never understood how preemphasis/deemphasis mitigates bad data >>converters. Can you please explain it?
> AFAIK it does not mitigate "bad" data converters per se; it mitigates any > source of additive white noise (an accurate and properly dithered > data converter being an example of such). It can do this because > the original audio is not spectrally flat, and the pre-emphasis is > a poor-man's whitening filter.
Sounds right to me. FM radio has pre-emphasis for about the same reason. Vinyl records and audio tape have slightly more complicated equalization functions, but again the pre-emphasis helps with high frequency noise. -- glen
Reply by November 21, 20152015-11-21
Agreed.  Extra noise added by poor converter performance is low pass filtered, and the frequencies of the de-emph filters do an ok job of reducing the noise before it gets into the peak sensitivity range of your ear in the 2k-5k range. But if you try to record jangling keys or some other source that does not fall off with frequency you might clip the A/D converter due to the pre-emphasis. Otherwise it would be good to have it on permanently. 

I don't think phase wrapping is an issue, the pre-emph filter is only first-order so the phase-shift should not exceed 90 degrees and even if it did you would just unwrap it before comparing with the target (which would also be unwrapped) 

This is such a simple filter that you can do an ok job just mapping the analog pole-zero locations into the z domain using the standard bi-linear transform and then spend a few minutes wiggling them around a bit to get the best match. It's fun being your own optimizer! 

An fir version is a different story, you'll definitely want to use an optimizer for that. But if your hardware can do either IIR or FIR I don't know why you wouldn't choose IIR. 

Bob
Reply by Randy Yates November 20, 20152015-11-20
spope33@speedymail.org (Steve Pope) writes:

> Randy Yates <yates@digitalsignallabs.com> wrote: > >>I've never understood how preemphasis/deemphasis mitigates bad data >>converters. Can you please explain it? > > AFAIK it does not mitigate "bad" data converters per se; it mitigates any > source of additive white noise (an accurate and properly dithered > data converter being an example of such). It can do this because > the original audio is not spectrally flat, and the pre-emphasis is > a poor-man's whitening filter.
Yes! I believe you hit it spot-on, Steve. Thank you. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by Steve Pope November 20, 20152015-11-20
Randy Yates  <yates@digitalsignallabs.com> wrote:

>I've never understood how preemphasis/deemphasis mitigates bad data >converters. Can you please explain it?
AFAIK it does not mitigate "bad" data converters per se; it mitigates any source of additive white noise (an accurate and properly dithered data converter being an example of such). It can do this because the original audio is not spectrally flat, and the pre-emphasis is a poor-man's whitening filter. Steve
Reply by Randy Yates November 20, 20152015-11-20
radams2000@gmail.com writes:
> [...] > It's worth noting very few CD's use the optional pre-emphasis. Mostly > this was done in the 80's because the data converters were not very > good.
Bob, I've never understood how preemphasis/deemphasis mitigates bad data converters. Can you please explain it? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by glen herrmannsfeldt November 20, 20152015-11-20
radams2000@gmail.com wrote:
> Since your application is audio, the question of whether the phase > is important is highly controversial and it is better to avoid > the discussion by trying to match both amplitude and phase.
In this case, the purpose isn't to maintain actual phase, but to reduce the discontinuity when it wraps.
> It's worth noting very few CD's use the optional pre-emphasis. > Mostly this was done in the 80's because the data converters > were not very good.
Even more, there are stories from the 80's of using one DAC for both channels, presumably to save money. I don't know that the pre-emphasis was ever used. Rarely as far as I know. The cdrecord program for writing CD-Rs can turn the bit on, but you have to do the pre-emphasis yourself. -- glen
Reply by November 20, 20152015-11-20
Since your application is audio, the question of whether the phase is important is highly controversial and it is better to avoid the discussion by trying to match both amplitude and phase. 
It's worth noting very few CD's use the optional pre-emphasis. Mostly this was done in the 80's because the data converters were not very good. 

Bob
Reply by Randy Yates November 20, 20152015-11-20
"b2508" <108118@DSPRelated> writes:

> Hi all, > > do you know if there is a way to make a de-emphasis filter a FIR filter. > > I already have a FIR filter implemented and I would like to just load it > with coefficients of de-emphasis FIR. > > Can approximation of IIR filter be done with FIR filter?
Yes. I suggest you use FDLS (Frequency Domain Least Squares) - it is an excellent method for generating these types of filters. I've used it for several such filters in the past. Google for details. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com