DSPRelated.com
Forums

Help: How to design the audio pre-emphas(J.17) filter.

Started by huhu February 6, 2007
Hi,
I'm working on a Nicam modulator in fpga,and such a system is
required
to perform pre-emphasis on the audio channels.Pre-emphasis filter
specified
 in the CCITT J.17 recommendation.
Has anybody implemented this pre-emphasis filter and could you give me
some
tips on how you generated the coefficients?

The pre-emphasis attenuation curve is given by the followingformula:
Insertion loss between nominal impedances =

10 log10 ( (75 + (w/3000)^2) / (1 + (w/3000)^2) ) dB

where 'w' is the angular frequency corresponding to frequency 'f'.

Some values are given .
f (kHz)    Insertion loss (dB)
0          18.75
0.05       18.70
0.2        18.06
0.4        16.48
0.8        13.10
2          6.98
4          3.10
6.4        1.49
8          1.01
10         0.68

Thank you for your help!

huhu

"huhu" <uxuhdong@gmail.com> writes:

> Hi, > I'm working on a Nicam modulator in fpga,and such a system is > required > to perform pre-emphasis on the audio channels.Pre-emphasis filter > specified > in the CCITT J.17 recommendation. > Has anybody implemented this pre-emphasis filter and could you give me > some > tips on how you generated the coefficients? > > The pre-emphasis attenuation curve is given by the followingformula: > Insertion loss between nominal impedances = > > 10 log10 ( (75 + (w/3000)^2) / (1 + (w/3000)^2) ) dB > > where 'w' is the angular frequency corresponding to frequency 'f'. > > Some values are given . > f (kHz) Insertion loss (dB) > 0 18.75 > 0.05 18.70 > 0.2 18.06 > 0.4 16.48 > 0.8 13.10 > 2 6.98 > 4 3.10 > 6.4 1.49 > 8 1.01 > 10 0.68 >
Since you have the s-domain response, I would use the binlinear transformation. -- % Randy Yates % "My Shangri-la has gone away, fading like %% Fuquay-Varina, NC % the Beatles on 'Hey Jude'" %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Shangri-La', *A New World Record*, ELO http://home.earthlink.net/~yatescr

Randy Yates wrote:


>>I'm working on a Nicam modulator in fpga,and such a system is >>required >>The pre-emphasis attenuation curve is given by the followingformula: >>Insertion loss between nominal impedances = >> >>10 log10 ( (75 + (w/3000)^2) / (1 + (w/3000)^2) ) dB >> >>where 'w' is the angular frequency corresponding to frequency 'f'. >>
> > Since you have the s-domain response, I would use the binlinear transformation.
It is not so simple. What is given is |H(s)|, not H(s). Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes:

> Randy Yates wrote: > > >>>I'm working on a Nicam modulator in fpga,and such a system is >>>required >>>The pre-emphasis attenuation curve is given by the followingformula: >>>Insertion loss between nominal impedances = >>> >>>10 log10 ( (75 + (w/3000)^2) / (1 + (w/3000)^2) ) dB >>> >>>where 'w' is the angular frequency corresponding to frequency 'f'. >>> > >> Since you have the s-domain response, I would use the binlinear >> transformation. > > It is not so simple. What is given is |H(s)|, not H(s).
I'll bet it would take a competent engineer no more than 30 minutes to derive the s-domain transfer function that generated that response, if it is indeed not provided in the J.17 specification. -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:

> Since you have the s-domain response, I would use the binlinear transformation.
And the resultant pre-emphasis filter will have (1) infinite gain at nyquist (not a good thing) and (2) due to frequency warping, it probably won't have an ideal response. I fought with a 75uS pre-emphasis filter for FM broadcast a while ago. Adding extra poles/zeroes to get the gain down at nyquist while keeping a decent response turned out to be an exercise in futility; I ultimately gave up on an IIR implementation in favour of a FIR. GM
Gary Marsh <gma_rs_h_23_@ya_hoo_.c_a> writes:

> Randy Yates wrote: > >> Since you have the s-domain response, I would use the binlinear transformation. > > And the resultant pre-emphasis filter will have (1) infinite gain at > nyquist (not a good thing) [...]
It has a pure differentiator term in the transfer function? That's not good. Perhaps the resulting pole at Nyquist could be hand-modified to be a "leaky pole" (i.e., of the form z + p, p < 1)? Just thinking out loud - in practice dropping to an FIR approximation may well be the thing to do. -- % Randy Yates % "She tells me that she likes me very much, %% Fuquay-Varina, NC % but when I try to touch, she makes it %%% 919-577-9882 % all too clear." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
Vladimir Vassilevsky wrote:
> > > Randy Yates wrote: > > >>> I'm working on a Nicam modulator in fpga,and such a system is >>> required >>> The pre-emphasis attenuation curve is given by the followingformula: >>> Insertion loss between nominal impedances = >>> >>> 10 log10 ( (75 + (w/3000)^2) / (1 + (w/3000)^2) ) dB >>> >>> where 'w' is the angular frequency corresponding to frequency 'f'. >>> > >> >> Since you have the s-domain response, I would use the binlinear >> transformation. > > It is not so simple. What is given is |H(s)|, not H(s).
Minimum phase is implicit. Unfortunately, not explicit. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Randy Yates wrote:

> Just thinking out loud - in practice dropping to an FIR approximation > may well be the thing to do.
Hard to approximate minimum phase that way. It often doesn't matter, but sometimes it does. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
In article <DE1yh.35340$Fd.32981@edtnps90>, gma_rs_h_23_@ya_hoo_.c_a says...
> > >Randy Yates wrote: > >> Since you have the s-domain response, I would use the binlinear
transformation.
> >And the resultant pre-emphasis filter will have (1) infinite gain at >nyquist (not a good thing) and (2) due to frequency warping, it probably >won't have an ideal response.
J.17 is a first-order shelving pre-emphasis with an s-plane zero at 477 Hz and a pole at 4134 Hz. It is pssible to make excellent IIR magnitude approximations for this filter. For example, here is one for 44.1 kHz sample rate: SUPPLY BEGINNING & END OF APPROXIMATION BAND (Hz): 0 20000 SUPPLY # POLES IN Z-PLANE (<=10):3 Zero # Real Imag. 1 -0.6319376 0.000000 2 -0.2076843 0.000000 3 0.9342956 0.000000 Pole # Real Imag. 1 -0.6331556 0.000000 2 -0.2103373 0.000000 3 0.5548595 0.000000 MAXIMUM ERROR FROM 0.00 Hz TO 20000.00 Hz IS 0.0000596dB Here's a 44.1 kHz approximation accurate to 0.0000005dB :-) SUPPLY # POLES IN Z-PLANE (<=10):5 Zero # Real Imag. 1 -0.7974058 0.000000 2 -0.5688552 0.000000 3 -0.3090938 0.000000 4 -0.8632111E-01 0.000000 5 0.9342969 0.000000 Pole # Real Imag. 1 -0.7977225 0.000000 2 -0.5697525 0.000000 3 -0.3106903 0.000000 4 -0.8745085E-01 0.000000 5 0.5548844 0.000000 MAXIMUM ERROR FROM 0.00 Hz TO 20000.00 Hz IS 0.0000005dB
> >I fought with a 75uS pre-emphasis filter for FM broadcast a while ago. >Adding extra poles/zeroes to get the gain down at nyquist while keeping >a decent response turned out to be an exercise in futility; I ultimately >gave up on an IIR implementation in favour of a FIR.
Here's an IIR magnitude approximation for 75 us preemphasis for 44.1 kHz: SUPPLY BEGINNING & END OF APPROXIMATION BAND (Hz): 0 20000 SUPPLY # POLES IN Z-PLANE (<=10):3 Zero # Real Imag. 1 -0.6643391 0.000000 2 -0.2464311 0.000000 3 0.7390115 0.000000 Pole # Real Imag. 1 -0.6916846 0.000000 2 -0.3365219 0.000000 3 -0.5891875E-01 0.000000 MAXIMUM ERROR FROM 0.00 Hz TO 20000.00 Hz IS 0.0005997dB These were computed using a Fortran program I wrote that uses Remes' second algorithm to make a minimax magnitude approximation on a warped frequency axis, such that bilinear transformation of the approximation yields the z- plane poles and zeros. The results are always minimum-phase. So are 75 us and J.17 preemphasis. However, the group delay of the digital approximation does not match the analog specification precisely because of the differences in the magnitude response of the digital and analog curves outside the frequency range of the minimax magnitude approximation.
*looks at post*
*looks at Optimod 8400 in audio test rack*
*looks at post*
*looks at Optimod*
*looks at post*

Whoa.

I think I'll play around with remez - straight bilinear followed by a 
game of darts with poles and zeros probably isn't the optimal way to 
design these things, so I've found.

I'm getting the same sort of error in my FIR 75us approximation, but 
using quite a few more than 6 MACs to do it. Mind you, that filter's 
usually off - most people tend to do pre-emphasis in your box. :-)

Thanks for the advice.

GM


Robert Orban wrote:
> In article <DE1yh.35340$Fd.32981@edtnps90>, gma_rs_h_23_@ya_hoo_.c_a says... >> >> Randy Yates wrote: >> >>> Since you have the s-domain response, I would use the binlinear > transformation. >> And the resultant pre-emphasis filter will have (1) infinite gain at >> nyquist (not a good thing) and (2) due to frequency warping, it probably >> won't have an ideal response. > > J.17 is a first-order shelving pre-emphasis with an s-plane zero at 477 Hz and > a pole at 4134 Hz. > > It is pssible to make excellent IIR magnitude approximations for this filter. > For example, here is one for 44.1 kHz sample rate: > > SUPPLY BEGINNING & END OF APPROXIMATION BAND (Hz): 0 20000 > SUPPLY # POLES IN Z-PLANE (<=10):3 > Zero # Real Imag. > 1 -0.6319376 0.000000 > 2 -0.2076843 0.000000 > 3 0.9342956 0.000000 > Pole # Real Imag. > 1 -0.6331556 0.000000 > 2 -0.2103373 0.000000 > 3 0.5548595 0.000000 > MAXIMUM ERROR FROM 0.00 Hz TO 20000.00 Hz IS 0.0000596dB > > Here's a 44.1 kHz approximation accurate to 0.0000005dB :-) > > SUPPLY # POLES IN Z-PLANE (<=10):5 > Zero # Real Imag. > 1 -0.7974058 0.000000 > 2 -0.5688552 0.000000 > 3 -0.3090938 0.000000 > 4 -0.8632111E-01 0.000000 > 5 0.9342969 0.000000 > Pole # Real Imag. > 1 -0.7977225 0.000000 > 2 -0.5697525 0.000000 > 3 -0.3106903 0.000000 > 4 -0.8745085E-01 0.000000 > 5 0.5548844 0.000000 > MAXIMUM ERROR FROM 0.00 Hz TO 20000.00 Hz IS 0.0000005dB > > >> I fought with a 75uS pre-emphasis filter for FM broadcast a while ago. >> Adding extra poles/zeroes to get the gain down at nyquist while keeping >> a decent response turned out to be an exercise in futility; I ultimately >> gave up on an IIR implementation in favour of a FIR. > > Here's an IIR magnitude approximation for 75 us preemphasis for 44.1 kHz: > > SUPPLY BEGINNING & END OF APPROXIMATION BAND (Hz): 0 20000 > SUPPLY # POLES IN Z-PLANE (<=10):3 > Zero # Real Imag. > 1 -0.6643391 0.000000 > 2 -0.2464311 0.000000 > 3 0.7390115 0.000000 > Pole # Real Imag. > 1 -0.6916846 0.000000 > 2 -0.3365219 0.000000 > 3 -0.5891875E-01 0.000000 > MAXIMUM ERROR FROM 0.00 Hz TO 20000.00 Hz IS 0.0005997dB > > These were computed using a Fortran program I wrote that uses Remes' second > algorithm to make a minimax magnitude approximation on a warped frequency > axis, such that bilinear transformation of the approximation yields the z- > plane poles and zeros. > > The results are always minimum-phase. So are 75 us and J.17 preemphasis. > However, the group delay of the digital approximation does not match the > analog specification precisely because of the differences in the magnitude > response of the digital and analog curves outside the frequency range of the > minimax magnitude approximation. >