Fast Attack Slow Decay 解释

You might search comp.dsp for relevant threads.  There have been a few.

A simple explanation of an AGC implmentation goes something like this:

1) You will detect the peak levels.

2) You will use the peak levels to control the gain according to some simple
gain formula related to the control input to that formula.  Something like
Gain=1/(A+B*control) where control is a function of the time history of the
peaks so that if the peaks and control are zero, the gain is maximum and if
the peaks and control are very high, the gain is minimum.  It does make
sense to set a maximum and minimum.
You set A and B according to your situation, scaling, gains, etc.

3) You decide how fast the AGC will react to a sequence of peaks - either
higher peaks or lower peaks.  A very normal method is to use "fast attack"
and "slow decay" under the assumption that high peaks are likely to be
followed by more high peaks and more than a few low peaks are necessary to
predict a longer sequence of quiet passages.  You will pick times (or filter
coefficients) for attack and decay.

4) You will implement a filter that generates the fast attack / slow decay
control signal.  It could be as simple as:
if peak(k)>control
  control(k) = control(k-1) + C*(peak(k) -control(k-1)); where C might be
0.90
endif
if peak(k)<control
  control(k) = control(k-1) - D*(control(k-1) - peak(k)); where D might be
0.50
endif

The idea is to add 90% of the difference on the increasing side and to
subtract 50% of the difference on the decreasing side.  You pick the numbers
to use to suit your application.

Fred
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值