DSPRelated.com
Forums

Help! no feedback AGC algorithm

Started by Unknown July 18, 2005
Hi,
   I am writing a program to process some pre-recorded signal data
files (very large), an AGC block is needed in the processing. I was
wondering, instead of using a feedback loop, is there a non-feedback
way to do this thing? since I've alread have all these input data, if I
can do it in a non-feedback way, I can use P4 processor's SIMD and
Hyperthreading to speedup the process.
   I am not a math guy. So math gurus please help me with this problem.

Thanks!

jerryzy@gmail.com wrote:
> Hi, > I am writing a program to process some pre-recorded signal data > files (very large), an AGC block is needed in the processing. I was > wondering, instead of using a feedback loop, is there a non-feedback > way to do this thing? since I've alread have all these input data, if I > can do it in a non-feedback way, I can use P4 processor's SIMD and > Hyperthreading to speedup the process.
Define the kind of AGC you want. Put differently, what do you want the AGC to do? I could suggest alternatives, but you start the process. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
A non feedback AGC simply adjusts the gain by looking at the input
signal instead of looking at the output signal.   If the input is 10x
too big, set the gain to 0.1...etc.   You still need to do some
averaging and filtering but as you noted, you already have all the data
so you can figure out the correct gain ahead of time.

Non feedback AGCs are difficult to implement in analog hardware because
the detectors and gain control must be very accurate.  These are not
issues in DSP land. 


Mark

jerryzy@gmail.com wrote:

> Hi, > I am writing a program to process some pre-recorded signal data > files (very large), an AGC block is needed in the processing. I was > wondering, instead of using a feedback loop, is there a non-feedback > way to do this thing? since I've alread have all these input data, if I > can do it in a non-feedback way, I can use P4 processor's SIMD and > Hyperthreading to speedup the process. > I am not a math guy. So math gurus please help me with this problem. > > Thanks! >
Do you want to play the entire file with one altered gain, or do you want the gain to change dynamically as the file is processed? One drawback of real-time AGC is that one never knows if a sudden loud event is a spike or the leading edge of a signal that's going to be loud for a while. If you process your file with a window you can calculate the best gain for the center of the window (or better yet the best spot to make a certain gain change). You could even do this as a two-run algorithm where you run through once for the gain control and again to process the signal. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Can I understand feedback AGC and non feedback AGC in this way:

Like driving a car, feedback AGC is like automatic transmission, you
change the gear when road condition changes. Non feedback AGC is like
manual transmission, you change the gear when you see there's a road
condition change ahead.

> Do you want to play the entire file with one altered gain, or do you > want the gain to change dynamically as the file is processed?
I can do N signals' AGC at a time, the larger N is, the slower response the AGC will have. I can make N as small as possible while I can still take advantage of SIMD instructions.
> You could even do this as a two-run > algorithm where you run through once for the gain control and again to > process the signal.
Definitely, two-run processing will benefit from SIMD instructions and Hyperthreading. Is my understanding correct?
jerryzy@gmail.com wrote:

> Can I understand feedback AGC and non feedback AGC in this way: > > Like driving a car, feedback AGC is like automatic transmission, you > change the gear when road condition changes. Non feedback AGC is like > manual transmission, you change the gear when you see there's a road > condition change ahead. > > >>Do you want to play the entire file with one altered gain, or do you >>want the gain to change dynamically as the file is processed? > > > I can do N signals' AGC at a time, the larger N is, the slower response > the AGC will have. I can make N as small as possible while I can still > take advantage of SIMD instructions. > > >>You could even do this as a two-run >>algorithm where you run through once for the gain control and again to >>process the signal. > > > Definitely, two-run processing will benefit from SIMD instructions and > Hyperthreading. > > Is my understanding correct? >
Your understanding is more or less correct; you'll learn the rest by doing. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
"Mark" <makolber@yahoo.com> wrote in message 
news:1121698004.599944.299080@g49g2000cwa.googlegroups.com...
> > A non feedback AGC simply adjusts the gain by looking at the input > signal instead of looking at the output signal. If the input is 10x > too big, set the gain to 0.1...etc. You still need to do some > averaging and filtering but as you noted, you already have all the data > so you can figure out the correct gain ahead of time. > > Non feedback AGCs are difficult to implement in analog hardware because > the detectors and gain control must be very accurate. These are not > issues in DSP land.
These are sometimes called "feed" and as Mark indicated, they work very well in DSPs. They are also a bit simpler to debug, IMHO, so that would be my recommendation. Keep in mind that feedback and feedforward are mathematically equivalent ways of achieving the same thing.
"Jon Harris" <jon99_harris7@hotmail.com> wrote in message 
news:ak_Ce.32373$Tx1.16586@trnddc03...
> "Mark" <makolber@yahoo.com> wrote in message > news:1121698004.599944.299080@g49g2000cwa.googlegroups.com... >> >> A non feedback AGC simply adjusts the gain by looking at the input >> signal instead of looking at the output signal. If the input is 10x >> too big, set the gain to 0.1...etc. You still need to do some >> averaging and filtering but as you noted, you already have all the data >> so you can figure out the correct gain ahead of time. >> >> Non feedback AGCs are difficult to implement in analog hardware because >> the detectors and gain control must be very accurate. These are not >> issues in DSP land. > > These are sometimes called "feed" and as Mark indicated,
That was supposed to say "feedforward". Darn spellchecker!
"Mark" <makolber@yahoo.com> wrote in message
news:1121698004.599944.299080@g49g2000cwa.googlegroups.com...
> > A non feedback AGC simply adjusts the gain by looking at the input > signal instead of looking at the output signal. If the input is 10x > too big, set the gain to 0.1...etc. You still need to do some > averaging and filtering but as you noted, you already have all the data > so you can figure out the correct gain ahead of time. > > Non feedback AGCs are difficult to implement in analog hardware because > the detectors and gain control must be very accurate. These are not > issues in DSP land. > > > Mark >
An ordinary AGC looks at the input signal too - otherwise how can it know how big it is!! A rectifier is how it is normally done followed by a low pass filter and a feedback to a voltage controlled amplifier or two. Shytot
<jerryzy@gmail.com> wrote in message
news:1121703689.166006.184470@g49g2000cwa.googlegroups.com...
> Can I understand feedback AGC and non feedback AGC in this way: > > Like driving a car, feedback AGC is like automatic transmission, you > change the gear when road condition changes. Non feedback AGC is like > manual transmission, you change the gear when you see there's a road > condition change ahead. >
Feedforward is normally when you can measure a disturbance directly and take action rather than relying on the gain of the AGC to do the job properly.Not so sure about this digital crap. Shytot