DSPRelated.com
Forums

Audio Limiter with EzKit Lite ADDS 2189M

Started by Roland Moschel February 6, 2005
Hi there,

is there any example code to build an Audio Limiter with the
EZKIT LITE 2189M Evaluation Board ?


Any suggestions ?

Thanks in advance


Roland
Hi,

I don't know if the full code is available, and I honestly don't believe it
is.

What would you need for the system? Maybe you can get some examples for
relevant blocks of the processing algorithm.

--
Jaime Andr�s Aranguren Cardona
jaac@nospam.sanjaac.com
SanJaaC Electronics
Soluciones en DSP
www.sanjaac.com

(Remove "nospam" from e-mail address)

"Roland Moschel" <melkarth@gmx.de> escribi&#4294967295; en el mensaje
news:4otb01l89d9e929lhsnm3ur85qs86j5a36@4ax.com...
> Hi there, > > is there any example code to build an Audio Limiter with the > EZKIT LITE 2189M Evaluation Board ? > > > Any suggestions ? > > Thanks in advance > > > Roland
Hi, 
I want to use the kit as a hearing protection 
behind an headphone amplifier.
It sould be able to eliminate short 
loudness peaks within the audio signal relatively fast.

best regards 

Roland

On Sun, 6 Feb 2005 15:38:12 -0500, "Jaime Andr&#4294967295;s Aranguren Cardona"
<jaac@nospam.sanjaac.com> wrote:

>Hi, > >I don't know if the full code is available, and I honestly don't believe it >is. > >What would you need for the system? Maybe you can get some examples for >relevant blocks of the processing algorithm.
Good...

What I meant was this: maybe you won't get the full code already done for
you, ar at least it won't be publicily availabe. But if you say for example:

- I need FIR filters.
- I need FFT processing.
- I need RMS calculation.
- I need adaptive filtering.

etc.... Maybe it will be easier, and code for those "blocks" IS already
publicily available.

I hope this helps.

--
Jaime Andr&#4294967295;s Aranguren Cardona
jaac@nospam.sanjaac.com
SanJaaC Electronics
Soluciones en DSP
www.sanjaac.com

(Remove "nospam" from e-mail address)

"Roland Moschel" <melkarth@gmx.de> escribi&#4294967295; en el mensaje
news:rc3d01dgqn153o22mpb4avqa47n6u931m0@4ax.com...
> Hi, > I want to use the kit as a hearing protection > behind an headphone amplifier. > It sould be able to eliminate short > loudness peaks within the audio signal relatively fast. > > best regards > > Roland > > On Sun, 6 Feb 2005 15:38:12 -0500, "Jaime Andr&#4294967295;s Aranguren Cardona" > <jaac@nospam.sanjaac.com> wrote: > > >Hi, > > > >I don't know if the full code is available, and I honestly don't believe
it
> >is. > > > >What would you need for the system? Maybe you can get some examples for > >relevant blocks of the processing algorithm. >
In article <1107731740.dd01ec3978f48444e79be4791b890680@teranews>,
	"Jaime Andr&#4294967295;s Aranguren Cardona" <jaac@nospam.sanjaac.com> writes:
> Good... > > What I meant was this: maybe you won't get the full code already done for > you, ar at least it won't be publicily availabe. But if you say for example: > > - I need FIR filters. > - I need FFT processing. > - I need RMS calculation. > - I need adaptive filtering. > > etc.... Maybe it will be easier, and code for those "blocks" IS already > publicily available. > > I hope this helps. >
For a peak limiter, given extremely variable analog source, I'd be tempted to use a FET (or other device) that is capable of providing gain control for extreme cases BEFORE digitization. The control signal could be provided by the DSP device, and would be applied before the A/D conversion. Maybe a LDR (light dependent resistor) type scheme would have better SNR and perhaps less distortion, but would respond more slowly. For a FET, a careful shaping of the control voltage (along with the traditional linearization) would help to mitigate some of the defects of a FET device. The gain control could be provided by a Gilbert cell-type device or a FET. A linearized FET might be especially useful in this case, becuase it would have little effect when gain reduction isn't applied, and the variations between FETS might be able to be calibrated out. (The control signal could come from a D/A from the DSP board.) (I'd initially suggest a series resistor and a parallel FET, and providing a max of perhaps 10dB of loss so as to avoid nonlinearity and minimizing SNR loss.) If the peaks go beyond 10dB (maybe 16dB) above full scale, then there would be problems worse than occasional overload. For stereo, you'd likely need two of the D/As, because each FET would need to be calibrated. Maybe this isn't practical, maybe it is... Unless the digital input has 20bits of A/D or more, I'd be a little worried about throwing away dynamic range... Well, maybe the gain control device would also throw away dynamic range??!?!?! Perhaps there is no perfect solution? If the A/D provides 20bits of resolution, then using an analog gain control would likely be overkill and would likely decrease quality, I guess? John
An uncompensated shunt JFET has the worst distortion at 6 dB
attenuation and it is pretty bad distortion.  The distortion is
minimized by using the smallest possible signal and......

There is an elegant way to reduce this distortion.  You use a resistor
network (or other method) and apply 1/2 the audio signal that is on the
drain to the gate.  This linearizes the JFET VCA.

See Fig 1 here:
http://sound.westhost.com/project67.htm

That is the purpose of the 2  1Meg resisotrs conected ot the gate.


Mark

In article <1107921249.845857.303780@l41g2000cwc.googlegroups.com>,
	"Mark" <makolber@yahoo.com> writes:
> An uncompensated shunt JFET has the worst distortion at 6 dB > attenuation and it is pretty bad distortion. The distortion is > minimized by using the smallest possible signal and...... > > There is an elegant way to reduce this distortion. You use a resistor > network (or other method) and apply 1/2 the audio signal that is on the > drain to the gate. This linearizes the JFET VCA. > > See Fig 1 here: > http://sound.westhost.com/project67.htm > > That is the purpose of the 2 1Meg resisotrs conected ot the gate. >
When I used the term 'linearized fet', I meant using the 50% feedback thing... The best way that I have done it is by using a buffer so as to avoid any feedthrough of the control signal. If you use too high a resistor value, then there are some negative HF effects, but too low and you'll get control feedthrough. With a buffer (which I don't know if you have shown a buffered version), then most of the problems are gone. The linearized fet thing is pretty well known (e.g. Siliconix app note.) John
In article <cudkc9$2phu$1@news.iquest.net>,
	toor@iquest.net (John S. Dyson) writes:
> In article <1107921249.845857.303780@l41g2000cwc.googlegroups.com>, > "Mark" <makolber@yahoo.com> writes: >> An uncompensated shunt JFET has the worst distortion at 6 dB >> attenuation and it is pretty bad distortion. The distortion is >> minimized by using the smallest possible signal and...... >> >> There is an elegant way to reduce this distortion. You use a resistor >> network (or other method) and apply 1/2 the audio signal that is on the >> drain to the gate. This linearizes the JFET VCA. >> >> See Fig 1 here: >> http://sound.westhost.com/project67.htm >> >> That is the purpose of the 2 1Meg resisotrs conected ot the gate. >> > When I used the term 'linearized fet', I meant using the 50% feedback > thing... The best way that I have done it is by using a buffer so as > to avoid any feedthrough of the control signal. If you use too high > a resistor value, then there are some negative HF effects, but too > low and you'll get control feedthrough. With a buffer (which I don't > know if you have shown a buffered version), then most of the problems > are gone. > > The linearized fet thing is pretty well known (e.g. Siliconix app note.) >
PS: it looks like it is the buffered and linearized version (good.) I wouldn't normally wish to use a FET, but with the possibility of proper calibration with control from an A/D from a DSP, then the FET matching issue is dealt with by automatic calibration. So, this would be a nearly ideal solution, where the linearized FET can provide (moderately) good high level dynamic range and the matching issues can be mitigated. 1) Use a FET gain control element, where the 50% feedback scheme is used, but the gain control voltage comes from the DSP board (perhaps filtered?) The 50% feedback should best be provided in the analog domain. 2) The FET gain control element should be in a SHUNT config, and should be laid out to provide a max of a few dB loss (maybe 10-15dB.) Most likely, the amount of peak limiting (when needed) should be just enough to stop clipping... The peak limiting should sound/work better than clipping, but it might be nicer if the peak limiter has limited effect on sound quality. 3) When handling 'peak' limiting, the delay of the D/A control voltage for the gate input (which is summed with the 50% feedback) needs to be considered, or the feedback might/will be unstable. 4) Each of the audio channels should have the gain control seperately controlled so that each channel can be properly calibrated. 5) Fast transitions of the gain control signal can inject some feedthough and the effect on the sound is ugly. If there is some limiting of slew rate of the gain control voltage, then the associated delay might need to be considered. In normal circumstances, the FET should be set for 0dB (or nearly so) loss. Given the FET will likely start being somewhat nonlinear somewhere in the 0.1V - 1V range (depending upon Vp and other design parameters), it is incredibly important to limit the normal input voltage to that range, and might be a good thing to make up for the signal level loss for better full scale usage of the A/D. When making up for the lost gain, there will be some delay in that preamp (very low noise, low gain) and it can affect the stability of the gain control feedback loop. WIth a very high Vp component, there will be a little more room for high signal levels, but even with 50% feedback, it won't be perfect. MAYBE, with the use of a fancy DSP, the entire gain control signal (including the 50% feedback) might be able to be created IN THE DSP. This might allow for compensating higher order effects (than just the 50% thing.) John
John wrote:

"
MAYBE, with the use of a fancy DSP, the entire gain control signal
(including
the 50% feedback) might be able to be created IN THE DSP.  This might
allow for compensating higher order effects (than just the 50% thing.)
"
Why not implement the whole effect in a DSP? That would nicely close
the loop on this thread and take us back to the OP's question.

Now, as to where one can find such code: I would try the FAQ
(http://www.bdti.com/faq/dsp_faq.htm)

Regards,
Andor

Andor wrote:
> John wrote: > > " > MAYBE, with the use of a fancy DSP, the entire gain control signal > (including > the 50% feedback) might be able to be created IN THE DSP. This might > allow for compensating higher order effects (than just the 50%
thing.)
> " > Why not implement the whole effect in a DSP? That would nicely close > the loop on this thread and take us back to the OP's question. > > Now, as to where one can find such code: I would try the FAQ > (http://www.bdti.com/faq/dsp_faq.htm) > > Regards, > Andor
I think we got off the whole DSP method becuase a previous poster was ocncerned that the A/D may have insufficient dynamic range to accpet the unliminted input signal. Using a DSP controlled analog VCA seems like a neat idea. John, yeah, I first saw the 50% feedback trick many years ago in a Siliconix app note. I have some other issues regarding the number of poles in the control loop feedback that I'd like to bounce off you. I have always found that you can't have more than a one pole filter on the control voltage. If you use tewo or mor pole you get bad overshoot in the gain control tracking during a transient input. And of course a one pole filter does not do a good job of removing the audio so you get some distortion due to tthe modulaiton. Can you e-mail me at mkolber "at" motorola "dot" com email addr