Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Simple AGC (automatic gain control) algorithm

There are 24 messages in this thread.

You are currently looking at messages 0 to 10.


Simple AGC (automatic gain control) algorithm - AntonZ - 2003-07-29 07:46:00

I need a simple AGC system. I have no time to develop it thourouly and
have no much experience in creating such systems. Can anyone suggest a
simple AGC algorithm?
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - Phil Frisbie, Jr. - 2003-07-29 11:46:00



AntonZ wrote:

> I need a simple AGC system. I have no time to develop it thourouly and
> have no much experience in creating such systems. Can anyone suggest a
> simple AGC algorithm?

I include a simple AGC function in my free open source code library HawkVoiceDI. 
You can download it from my website below.

-- 
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - Eric Jacobsen - 2003-07-29 11:47:00

On 29 Jul 2003 04:46:26 -0700, a...@global-ops.com (AntonZ) wrote:

>I need a simple AGC system. I have no time to develop it thourouly and
>have no much experience in creating such systems. Can anyone suggest a
>simple AGC algorithm?

The simplest I know is:

if(signal too big)decrease gain,
else increase gain

Can't offer much more without more info.

Cheers,

Eric Jacobsen
Minister of Algorithms, Intel Corp.
My opinions may not be Intel's opinions.
http://www.ericjacobsen.org
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - Fred Marshall - 2003-07-29 16:15:00

"Eric Jacobsen" <e...@ieee.org> wrote in message
news:3...@news.earthlink.net...
> On 29 Jul 2003 04:46:26 -0700, a...@global-ops.com (AntonZ) wrote:
>
> >I need a simple AGC system. I have no time to develop it thourouly and
> >have no much experience in creating such systems. Can anyone suggest a
> >simple AGC algorithm?
>
> The simplest I know is:
>
> if(signal too big)decrease gain,
> else increase gain
>
> Can't offer much more without more info.
>
> Cheers,
>
> Eric Jacobsen
> Minister of Algorithms, Intel Corp.
> My opinions may not be Intel's opinions.
> http://www.ericjacobsen.org

if(signal too big)decrease gain by percentage "k1",
else increase gain by percentage "k2".
k1 and k2 determine how fast/slow the agc acts.  often k1>k2 so the agc acts
quickly / the gain decreases quickly / with large signals and only gradually
increases as signal level goes down.

Fred





______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - Jerry Avins - 2003-07-29 17:54:00

Fred Marshall wrote:
> 
> "Eric Jacobsen" <e...@ieee.org> wrote in message
> news:3...@news.earthlink.net...
> > On 29 Jul 2003 04:46:26 -0700, a...@global-ops.com (AntonZ) wrote:
> >
> > >I need a simple AGC system. I have no time to develop it thourouly and
> > >have no much experience in creating such systems. Can anyone suggest a
> > >simple AGC algorithm?
> >
> > The simplest I know is:
> >
> > if(signal too big)decrease gain,
> > else increase gain
> >
> > Can't offer much more without more info.
> >
> > Cheers,
> >
> > Eric Jacobsen
> > Minister of Algorithms, Intel Corp.
> > My opinions may not be Intel's opinions.
> > http://www.ericjacobsen.org
> 
> if(signal too big)decrease gain by percentage "k1",
> else increase gain by percentage "k2".
> k1 and k2 determine how fast/slow the agc acts.  often k1>k2 so the agc acts
> quickly / the gain decreases quickly / with large signals and only gradually
> increases as signal level goes down.
> 
> Fred

It's sometimes good to have a dead zone where the gain doesn't change.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - AntonZ - 2003-07-29 20:24:00

> The simplest I know is:
> 
> if(signal too big)decrease gain,
> else increase gain
That's that I already know. Your algorithm is about to change gain too
often, there should be some highmark and lowmark levels. The problem
is to determine is the signal is big or small.

> Can't offer much more without more info.
FSK 50-450kHz, processing is on fixed point 55xx. I can control VREF
level on ADC, depending on the signal. I want signal to have amplitude
not higher than 80-90% of the full scale and lower than 40-50% of full
scale. The problems are  how to measure is the signal "big" or
"small", how to adjust gain, how to do it on fixed point

Anton
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - AntonZ - 2003-07-29 23:03:00

> > if(signal too big)decrease gain by percentage "k1",

I want to develop an estimate. What is signal "too big", what is
signal "too small". I need a reliable estimate of what is "big" and
what is "small". It seems to be the most difficult task to develop
such an estimate in AGC system design
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - Matt Boytim - 2003-07-30 00:35:00

a...@global-ops.com (AntonZ) wrote in message news:<7...@posting.google.com>...
> I need a simple AGC system. I have no time to develop it thourouly and
> have no much experience in creating such systems. Can anyone suggest a
> simple AGC algorithm?

A good agc should have a true scale invariant property.  That is, if
x-->y then g*x-->y .  This requires some kind of log or exponential
relationship in the control path.  There is a simple and good agc in
one of the ti dsp app notes, not as agc by itself but as part of
another application.  Can't remember the app or the volume but it's
there somewhere.

Matt
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - Tom - 2003-07-30 01:57:00


AntonZ wrote:

> I need a simple AGC system. I have no time to develop it thourouly and
> have no much experience in creating such systems. Can anyone suggest a
> simple AGC algorithm?

You cannot really do the 'if this bigger than that then reduce that
routine' as it is pretty ad-hoc by all accounts and not a true servo.In
fact I am willing to bet that that approach may lead to an alegbraic loop
(though not sure).

See this earlier thread

http://groups.google.co.nz/groups?q=agc+code+aberdonian_2000&hl=en&lr=&ie=UTF-8&safe=off&selm=3E5F11
BE.BCE4F612%40NAESPAMm.com&rnum=1



Assume yin is the input to the AGC (say a speech signal) and yout is the
AGC
output.

loop forever
{
/* Voltage controlled amplifier is just a multiplier here */
yout=yin*iout

/* error */
err=spoint-abs(yout)

/* Integrate */
iout1=iout
iout=iout1+gain*err }



The gain needs to found by trial and error. If gain is too big you will
get instability
and if too small it will be too slow to respond. try gain=0.001 for
starters and increase it. In fact the gain limit is a function of the size
of yin.
spoint = 1 will do for a set-point.

All an AGC is is a voltage controlled amplifier (a multiplier here), a
rectifier, a setpoint and a low-pass filter. The filter here is an
integrator so as to get zero steady-state errror to a step change in
amplitude. If you wnat to get fancy you can have two integrators and
phase-lead compensator though it is difficult to keep stable for large
dynamic ranges.


regards

Tom


______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Simple AGC (automatic gain control) algorithm - AntonZ - 2003-07-30 06:06:00

Tom,

Your AGC is a hell of simple! I even have doubts it will work. It
seems it can be easily adapted to fixed point. I will try to model it
in Matlab/Simulink.

> > I need a simple AGC system. I have no time to develop it thourouly and
> > have no much experience in creating such systems. Can anyone suggest a
> > simple AGC algorithm?
> 
> You cannot really do the 'if this bigger than that then reduce that
> routine' as it is pretty ad-hoc by all accounts and not a true servo.In
> fact I am willing to bet that that approach may lead to an alegbraic loop
> (though not sure).
> 
> See this earlier thread
> 
>
http://groups.google.co.nz/groups?q=agc+code+aberdonian_2000&hl=en&lr=&ie=UTF-8&safe=off&selm=3E5F11
BE.BCE4F612%40NAESPAMm.com&rnum=1
> 
> 
> 
> Assume yin is the input to the AGC (say a speech signal) and yout is the
> AGC
> output.
> 
> loop forever
> {
> /* Voltage controlled amplifier is just a multiplier here */
> yout=yin*iout
> 
> /* error */
> err=spoint-abs(yout)
> 
> /* Integrate */
> iout1=iout
> iout=iout1+gain*err }
> 
> 
> 
> The gain needs to found by trial and error. If gain is too big you will
> get instability
> and if too small it will be too slow to respond. try gain=0.001 for
> starters and increase it. In fact the gain limit is a function of the size
> of yin.
> spoint = 1 will do for a set-point.
> 
> All an AGC is is a voltage controlled amplifier (a multiplier here), a
> rectifier, a setpoint and a low-pass filter. The filter here is an
> integrator so as to get zero steady-state errror to a step change in
> amplitude. If you wnat to get fancy you can have two integrators and
> phase-lead compensator though it is difficult to keep stable for large
> dynamic ranges.
> 
> 
> regards
> 
> Tom
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

| 1 | 2 | 3 | next