DSPRelated.com
Forums

De Emphasis FIR Filter

Started by b2508 November 20, 2015
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?

If I had an impulse and let it throught IIR filter and took the output,
could that output be a FIR filter coefficients?

Thank you in advance.

---------------------------------------
Posted through http://www.DSPRelated.com
Yes you can use the IIR impulse response as FIR coefficients. You can minimize the effect of truncating the IIR sequence by windowing with a half-window (starts at 1.0 and gradually fades to 0 at the end). The pre-emphasis filter was probably IIR so if you care about phase it's probably best to stick with IIR de-emphasis or an FIR copy of the IIR de-emph filter.   You'll have to experiment with the FIR length to minimize the response errors. 

Bob
>Yes you can use the IIR impulse response as FIR coefficients. You can >minimize the effect of truncating the IIR sequence by windowing with a >half-window (starts at 1.0 and gradually fades to 0 at the end). The
pre-emphasis
>filter was probably IIR so if you care about phase it's probably best to >stick with IIR de-emphasis or an FIR copy of the IIR de-emph filter.
You'll
>have to experiment with the FIR length to minimize the response errors. > >Bob
Thank you for your answer. I am not sure if I care about the phase :-) I do not fully understand its influence and when is it important and when not. And how do I get A and B coefficients for de-emphasis filter? I do not know what the standard is in Europe, I have read it is 50us for time constant but somewhere on web, they mention 15/50 rule but I don't get it. Also, formula is always given as transfer function (which is analog,. right?) so I don't know how to turn it to digital coefficients. So if I had Hde(s) = 1/(1+uS) and u = 50 us (i dont have greek letters sorry) how do I determine A and B? --------------------------------------- Posted through http://www.DSPRelated.com
"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
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
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
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
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
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
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