Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3867303B2 - Auto gain control circuit - Google Patents
[go: Go Back, main page]

JP3867303B2 - Auto gain control circuit - Google Patents

Auto gain control circuit Download PDF

Info

Publication number
JP3867303B2
JP3867303B2 JP12565095A JP12565095A JP3867303B2 JP 3867303 B2 JP3867303 B2 JP 3867303B2 JP 12565095 A JP12565095 A JP 12565095A JP 12565095 A JP12565095 A JP 12565095A JP 3867303 B2 JP3867303 B2 JP 3867303B2
Authority
JP
Japan
Prior art keywords
value
overrate
input
rate
attenuation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP12565095A
Other languages
Japanese (ja)
Other versions
JPH08297923A (en
Inventor
唯夫 佐々木
卓治 姫野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP12565095A priority Critical patent/JP3867303B2/en
Publication of JPH08297923A publication Critical patent/JPH08297923A/en
Application granted granted Critical
Publication of JP3867303B2 publication Critical patent/JP3867303B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Digital Magnetic Recording (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Control Of Amplification And Gain Control (AREA)

Description

【0001】
【産業上の利用分野】
本発明はオーディオ信号の伝送系などに用いられるオートゲインコントロール回路(以下、AGC回路という)に関するものである。
【0002】
【従来の技術】
従来より、各種機器においてAGC回路は採用されている。例えばデジタルオーディオテープレコーダなどにおいては、記録信号となるオーディオ信号のレベルが一定レベル以上にならないようにしているものが多い。具体的にはオーディオ信号を減衰器(アッテネータ)に供給し、所定量の減衰を実行させるものであるが、その減衰量はオーディオ信号レベルの検出値に基づいて自動的にコントロールされるようにしている。
減衰量の制御に用いるオーディオ信号レベルの検出値とは、例えば或る期間におけるピーク検出値としたり、もしくは平均値としたりすることが行なわれている。
【0003】
【発明が解決しようとする課題】
ところで、従来のAGC回路では、急激に大きなレベルの信号が入力された場合には、途中で信号がクリップされてしまい、検出されるピーク値や平均値は実際の値よりも小さいものとなってしまうことがある。
例えば図6においてデジタル値で『7FFFh』(なお『h』のついた数値は16進表現)がクリップレベルとした場合に、急激に実線で示すような大振幅の入力があったとする。
このとき、この入力に対するAGC回路の応答性が追付かない場合は、図6に一点鎖線で示すように波形がクリップされてしまう。
【0004】
このように波形がクリップされた場合、そのレベルは当然ながら実際のレベルより小さいものとなり、つまり実際の値よりも小さいピーク値や平均値が検出されてしまう。そして、その検出値に基づいて減衰量を制御するものであるため、実際の値よりも小さい値が検出されるということは、そのAGC回路が、入力に対する応答時間が遅くなってしまうということになる。つまり、大振幅入力に対して適切な減衰量を与え、クリップが発生しないようにするまでに時間を要することになる。
このため、急激な大振幅入力については、信号がクリップすることが避けられず、信号の歪を発生させることになるという問題があった。
【0005】
【課題を解決するための手段】
本発明はこのような問題に鑑みてなされたもので、AGC回路における減衰手段の減衰量を設定する基準値として、オーバーレート検出手段によって或る時間間隔において入力された信号をA/D変換して出力されたデジタルデータの信号レベルが或る規定値を越えている時間の比率であるオーバーレートを検出する。そして、このオーバーレートに基づいて減衰制御量発生手段において減衰制御量を発生させる。
【0006】
このとき、オーバーレート検出手段によるオーバーレート検出動作のための前記信号レベルの測定を行なう時間間隔が変動した場合に減衰手段に対する減衰制御量の応答性が変動しないように、減衰制御量発生手段は、時間間隔の変動に対応して減衰制御量の算出のための係数を選択するようにする。
【0007】
【作用】
ある時間間隔において、信号レベルが或る規定値を越えている時間を検出し、いわゆるオーバーレートを求めるようにすると、例えクリップが発生するような大振幅の信号が入力されても、オーバーレートはその振幅量に応じた値となる。つまり、瞬間的にクリップが発生して適正なピーク値、平均値が求められない状態であっても、オーバーレートは信号レベルに応じた値として算出でき、これによって減衰量をコントロールすることで、迅速な応答性を実現できることになる。
【0008】
【実施例】
以下、図1〜図5により本発明のAGC回路の実施例を説明する。
図1は例えば録音装置などに搭載されるAGC回路の構成を示したものである。
【0009】
一点鎖線で示すAGC回路1は例えば磁気テープ等を記録媒体として音声信号を記録する記録装置部20の前段に設けられる。記録信号となるオーディオ信号は端子2からAGC回路1に入力され、減衰器3に供給される。
減衰器3では供給される減衰制御信号ATTS に応じた減衰量で入力されたオーディオ信号を減衰させて出力する。
減衰器3の出力はアンプ4を介してA/D変換器5に供給され、デジタルデータとされる。そしてそのデジタルデータはDSP(デジタルシグナルプロセッサ)6において各種所要の処理が施される。
【0010】
DSP6で処理されたデジタルデータは端子11から記録装置部20に供給され例えば磁気ヘッドから磁気テープなどのメディアに記録されることになる。例えばこの記録装置部20はDAT(デジタルオーディオテープ)記録装置部などで実現される。
DSP6においての記録装置部20に対する記録信号の供給動作のための処理としては、データの変調、記録フォーマットへの変換やエラー訂正用の符号付加、さらに各種制御データの付加等が行なわれることになる。
【0011】
AGC回路1の動作としては、DSP6は入力されたデジタルデータから、ピークレベルPK.LVL、オーバーレートOV.RATE 、平均値M.LVL を検出し、これを出力する。
検出されたピークレベルPK.LVL、及びオーバーレートOV.RATE はローパスフィルタ7に供給される。
また検出された平均値M.LVL は、ローパスフィルタ8及びローパスフィルタ9に供給される。
各ローパスフィルタ7,8,9の出力は加算器10に供給され、演算処理が施される。そして、加算器10の出力が減衰制御信号ATTS となり、減衰器3に供給される。
【0012】
このように、本実施例のAGC回路1は、DSP6で検出されたオーディオ信号(デジタルデータ)のピークレベルPK.LVL、オーバーレートOV.RATE 、平均値M.LVL をローパスフィルタ7,8,9に注入して得られた値を加算し、減衰制御信号ATTS を生成することで、入力オーディオ信号のゲインを自動調整する回路系が構成されているものである。
【0013】
DSP6におけるピークレベルPK.LVLの検出動作は、入力されたデータの最大値を記憶することで実行される。これは例えば5msecなどの一定周期ごとに行なわれる。即ち、5msecの期間において逐次入力されてくるデータの最大値を更新しながら記憶していくことで、5msecの期間が終了した時点で記憶されているデータの値が、その5msecの期間のピークレベルPK.LVLとなる。この記憶されているピークレベルPK.LVLは5msec期間の終了時点で読み出されてローパスフィルタ7に出力されることになるが、DSP6内部の記憶値としてはこの時点でクリアされ、再び次の5msec期間でのピークレベルPK.LVLの検出動作に入ることになる。
なお、ピークレベルPK.LVL検出の対象となるデータとは、入力されるデジタルデータ(音声信号)について正負の値を絶対値に変換したデータである。
【0014】
DSP6における平均値M.LVL の検出動作は、入力された全てのデータを積算することで行なわれる。これは例えば100msecなどの一定周期毎に行なわれるものとなり、つまり、100msec内に入力されたデータの積算値が平均値M.LVL としてローパスフィルタ8,9に出力される。DSP6内に保持している積算値は、ローパスフィルタ8,9に出力した時点でクリアされ、再び次の100msec期間の積算動作を行なうことになる。
この平均値M.LVL の検出の対象となるデータも、入力されるデジタルデータ(音声信号)について正負の値を絶対値に変換したデータである。
なお、処理の都合上、必ずしも常に100msec毎にDSP6からの平均値M.LVL の読出を行なうことができないことが考えられるため、読出周期を数えるカウンタも用意する。このカウンタは読出動作でクリアされ、またサンプリングクロックでインクリメントされるものである。
【0015】
DSP6において検出されるオーバーレートOV.RATE とは、A/D変換器5からのデジタルデータとしての各サンプルデータのうち、一定レベルを越えたデータの個数を数えるカウンタによって計数される値である。なお、詳しくは後述するが、このカウンタの値はパーセンテージに変換され、オーバーレートOV.RATE とされるものであり、説明上、カウンタの計数値をオーバーレートOV.RATE 、カウンタの計数値をパーセンテージに変換した値をオーバーレート%OV.RATE とする。
【0016】
このオーバーレートOV.RATE の検出は例えば5msec毎に行なわれ、つまり5msec毎にカウンタの計数値から得られる値が読み出されてローパスフィルタ7に出力される。そしてこの読出によってカウンタの値はクリアされ、次の5msec期間における計数動作に入ることになる。
このオーバーレートOV.RATE の検出の対象となるデータも絶対値データであり、また処理の都合上、必ずしも常に5msec毎にDSP6からの読出を行なうことができないことが考えられるため、読出周期を数えるカウンタも用意している。このカウンタは上記平均値M.LVL に関するカウンタと同様に、読出動作でクリアされ、またサンプリングクロックでインクリメントされるものである。
【0017】
またオーバーレートOV.RATE の検出は、一定レベルを越えたデータの個数を数えることでなされるが、一定レベルとは、例えばデジタルデータの最大値の−1dB程度のレベルに設定すればよい。
例えばA/D変換器5からのデジタルデータが、16ビットの2の補数表現としてみた場合、データの最大値は『7FFFh』(=32768)となる。この場合、オーバーレートOV.RATE の検出は例えば『7FFDh』を越えたデータ数を数えるようにすればよい。
【0018】
図5にオーバーレートOV.RATE の検出の概念を示した。5msecの期間に図中▲1▼のようなデータ(音声信号)入力があったとすると、『7FFDh』を越えるデータはないため、オーバーレートOV.RATE =0となる。一方、図中▲2▼のようなデータ(音声信号)入力があったとすると、TOVと示す期間のデータ(一点鎖線部分)は『7FFDh』を越えることになり、このときのデータ数(サンプル数)がカウンタによって計数され、オーバーレートOV.RATE が検出される。
例えばA/D変換器5のサンプリング周波数が32KHz であるとすると、5msec期間には160サンプルのデータが入力される。そして図5のTOVが2msecの期間であると仮定すると、カウンタによって計数される値は『64』(64サンプル)となる。従ってオーバーレートOV.RATE =64となる。なお、パーセンテージとしてのオーバーレート%OV.RATE は、(64/160)×100=40%となる。
【0019】
図1における各ローパスフィルタ7,8,9は同一の構成としてよいが、アタックスレッショルドレベルTHD1、リカバリースレッショルドレベルTHD2、アタックゲインGAIN1 、リカバリーゲインGAIN2 、アタックタイムTC1 、リカバリータイムTC2 の各パラメータは次の(表1)に示すように異なるものとされている。
【表1】

Figure 0003867303
【0020】
そして、ローパスフィルタ7は、DSP6から供給されるピークレベルPK.LVL又はオーバーレートOV.RATE が入力され、応答の時定数が数msecと早いものとされる。
またローパスフィルタ8は、DSP6からの平均値M.LVL を入力とし、応答の時定数は数10msecと中間的なものとされ、さらにローパスフィルタ9もDSP6からの平均値M.LVL を入力とし、応答の時定数は数100msecと比較的ゆっくりなものとされている。
【0021】
上述のようにローパスフィルタ7,8,9の出力が加算器10で加算されて減衰制御信号ATTS が得られるが、図1の構成において仮にオーバーレートOV.RATE を考慮しないものとすると、いわゆる通常のAGCループが実現されるものとなる。
即ち本実施例では、オーバーレートOV.RATE を用いて減衰制御信号ATTS を生成する点が特徴的なものとなり、ここで、オーバーレートOV.RATE を減衰制御信号ATTS の生成の要素として取り入れた場合について説明する。
【0022】
いま、AGC回路1に入力される音声信号を正弦波と仮定する。このときに、オーバーレート%OV.RATE が図4に示す値OVa であったとすると、図中ATU で示す量が、いわゆるレベルオーバーしている量となる。そこで、値ATU に相当する分だけ減衰器3の減衰量を増加させてやれば、音声信号のゲインを、クリップしないレベルに設定することができることになる。
ここで、減衰量をY(dB)で表わすとすると、オーバーレート%OV.RATE に応じた減衰量Yは、
Y=20×log(1cos(0.5π・(%OV.RATE)/100))
で求めることができる。
つまり、オーバーレート%OV.RATE に応じた適切な減衰量Yが算出できる。
【0023】
ただし、このまま計算することは、ソフトウエア処理としてのオーバーヘッドが大きくなるため、次の式で減衰量Yを求めることとする。なお、オーバーレートOV.RATE となる計数値が256のときにオーバーレート%OV.RATE =100%としている。オーバーレート OV.RATE をXとすると、
0<X≦32のとき:Y=(X+4)・(X+4)/2 ・・・・・・[式1]
32<Xのとき :Y=(X−16)・X ・・・・・・[式2]
なお、この式では、オーバーレートOV.RATE ≧200の時に誤差が大きくなるが、減衰量を大きくしすぎると発振等の問題が発生するため、或る程度誤差があったほうが実際の装置としてはむしろ好都合なものとなる。
そしてこのようにして算出された減衰量Yが、即ち減衰制御信号ATTS の生成の1要素となるものである。
【0024】
このように本実施例では、オーバーレートOV.RATE を用いて減衰制御信号ATTS を生成する。
そしてAGC回路1において減衰器3に対する減衰量制御のための動作としては、DSP6における各データの読出、ローパスフィルタ7,8,9としての演算、加算器10の演算が必要になるわけであるが、これらの処理は実際には全てマイクロプロセッサーによるソフトウエアで実現できるものである。
マイクロプロセッサーによるソフトウエア処理を詳しく説明する前に、まず全体的な動作を概略的に説明すると次のようになる。
【0025】
DSP6はピークレベルPK.LVL及びオーバーレートOV.RATE を5msec毎にローパスフィルタ7としての演算処理に供給する。このときにオーバーレートOV.RATE =0であった場合は、ローパスフィルタ7としての演算処理、即ち前述した(表1)のパラメータに応じた演算についての入力はピークレベルPK.LVLを用いる。またオーバーレートOV.RATE が0でなかった場合は、上述した[式1][式2]で求められる値Yを用いてローパスフィルタ7としての演算処理を行なう。
【0026】
なお、通常ローパスフィルタへ入力された値は、時定数によって応答がゆっくりになるが、オーバーレートOV.RATE を入力として用いて演算する場合は、時定数をゼロとして、値Yを直接出力するようにしてもよい。これは、上述のように音声信号の値に対して好適な減衰量が分かることになるためである。
【0027】
一方、ローパスフィルタ8,9に対してはDSP6は平均値M.LVL を100msec毎に供給し、ローパスフィルタ8,9としての演算処理が行なわれる。
そしてこの3つのローパスフィルタ7,8,9の出力が加算器10としての演算処理で加算されて減衰制御信号ATTS が生成される。
このような動作により、本実施例のAGC回路1は、入力音声信号のレベルが通常の(クリップしない)範囲内であれば、平均値M.LVL やピークレベルPK.LVLに基づく減衰制御信号ATTS でいわゆる自動ゲイン調整が行なわれ、一方、クリップが生ずるような大振幅入力があった場合は、減衰制御信号ATTS の生成にオーバーレートOV.RATE が用いられることで、入力音声信号の振幅を推定し適正な減衰量を与えるという動作が行なわれ、応答性がよくしかも信号にクリップの発生しないような自動ゲイン調整が行なわれることになる。
【0028】
このような動作を実現するためのマイクロプロセッサーによるソフトウエア処理を図2のPADチャートで説明する。
AGC処理としてまず各種パラメータなどの初期設定がされた後(P101)、まずタイマTMがゼロにリセットされる。このタイマTMは100msecの周期を判別するためのものである。
そしてステップP103として、ステップP104〜P122の処理が、5msec毎に繰り返される。
この5msec毎の処理として、先ずタイマTMがインクリメントされる(P104)。次に、タイマTMの値が『20』以上になっているか否かが判別される。
タイマTMはステップP102又はP106でリセットされるものであり、タイマTMの値が『20』以上になるのは、100msecが経過した時点である。
【0029】
このタイマTMの値が『20』に達した時点、即ち100msecの周期タイミングであった場合は、ステップP106の処理でタイマTMがリセットされ、続いてDSP6から平均値M.LVL が読み出される。つまり、その時点までの100msecの期間にDSP6に入力されたデータの積算値が読み出される。
そして、平均値M.LVL を入力として、ローパスフィルタ8の出力が求められ(P108)、また同じく平均値M.LVL を入力として、ローパスフィルタ9の出力が求められる(P109)。
つまり、ステップP106〜P109の処理はローパスフィルタ8,9についての100msec毎に行なわれる処理となる。
【0030】
このステップP106〜P109の処理が行なわれた後、もしくはステップP105でタイマTMの値が『20』に達していないと判断された場合はステップP106〜P109の処理が行なわれずにステップP110の処理が行なわれる。つまり5msec周期の各タイミングでの処理は必ずステップP110に進む。そしてステップP110として、DSP6からピークレベルPK.LVL及びオーバーレートOV.RATE が読み出されることになる。
【0031】
次に、読み出されたオーバーレートOV.RATE が『0』より大きいか否かが判別される(P111)。オーバーレートOV.RATE が『0』より大きい場合、即ち大振幅の音声信号入力が生じていた場合は、ステップP112の処理として、オーバーレートOV.RATE からリミットレベルLMT.LVL が求められる。
このステップP112の処理は、上述した[式1][式2]に相当する。即ちまずオーバーレートOV.RATE をパーセンテージとしてのオーバーレート%OV.RATE に変換する。そして、例えばオーバーレート OV.RATE が32以下の場合は[式1]が用いられ、リミットレベルLMT.LVL は、
LMT.LVL =( OV.RATE +4)・( OV.RATE +4)/2
とされ、またオーバーレート OV.RATE が32より大きい場合は[式2]が用いられ、リミットレベルLMT.LVL は、
LMT.LVL =( OV.RATE −16)・( OV.RATE )
として求められる。
【0032】
一方、ステップP111でオーバーレートOV.RATE =0と判別された場合は、ステップP113で、読み出されたピークレベルPK.LVLが或る値に設定されているリミットスレッショルドレベルLMT.THD より大きいか否かが判別される。
そしてピークレベルPK.LVLがリミットスレッショルドレベルLMT.THD より大きければ、ステップP114でピークレベルPK.LVLからリミットレベルLMT.LVL が求められる。つまり、ピークレベルPK.LVLとリミットスレッショルドレベルLMT.THD の差分に対して所定の値に設定されているリミットゲインLMT.GAINが乗算され、それがリミットレベルLMT.LVL とされる。
また、ステップP113でピークレベルPK.LVLがリミットスレッショルドレベルLMT.THD 以下と判断されれば、ステップP115でリミットレベルLMT.LVL =0と設定される。
【0033】
ステップP111〜P115の処理でリミットレベルLMT.LVL が求められたら、それを入力として、ステップP116でローパスフィルタ7の出力が求められる。
そして、ローパスフィルタ7の出力が求められたら、図1における加算器10に相当する処理として、ステップP117でローパスフィルタ7,8,9の加算値LPF.SUM が算出される。
加算値LPF.SUM は、各ローパスフィルタ7,8,9の出力と、オフセット値が加算された値とされる。ローパスフィルタ8,9の出力とは、その時点以前でステップP108,P109 で求められている値である。また、オフセット値とは、基準レベルの音声信号入力時における減衰量に相当する値である。
【0034】
加算値LPF.SUM が求められたら、減衰動作として不必要に減衰量が変動しないようにバックラッシュ要素を加えるようにしている。このためにステップP118で加算値LPF.SUM とその時点の(前回の)制御信号値ATTS を比較し、加算値LPF.SUM が制御信号値ATTS を越えていたら、加算値LPF.SUM を今回の減衰制御信号値ATTS として設定する(P119)。
一方、加算値LPF.SUM が前回の制御信号値ATTS 以下であったら、次に前回の制御信号値ATTS と、加算値LPF.SUM にバックラッシュ値BLを加えた値を比較する(P120)。そして、この比較動作で前回の制御信号値ATTS が大きいという結果が出た場合は、加算値LPF.SUM にバックラッシュ値BLを加えた値を今回の減衰制御信号値ATTS として設定する(P121)。
ステップP120で否定結果が出た場合は、減衰制御信号値ATTS は更新しない。
【0035】
以上の処理で減衰制御信号値ATTS が設定されたら、ステップP122の処理として、その減衰制御信号値ATTS を減衰器3に供給し、減衰動作を実行させることになる。
この図2の処理が5msec毎に繰り返されることで、入力音声信号に対してクリップを生じさせずに、好適な自動ゲイン調整が実現される。
【0036】
なお、このようなAGC回路1において減衰器3がステップ方式で減衰量を変化させるものである場合は、ゲイン変更は入力信号レベルがゼロの時に行なうようにすることが好ましい。これは、振幅が大きいときにゲインを変えると信号の振幅がステップ上に変化し、いわゆるプチ音が聞こえることになるためである。しかしながら、オーバーレートが発生するような大振幅入力の時は、歪が大きくならないように、入力信号のレベルに関わらず、速やかにゲインを変えることが有効である。
【0037】
ところで、上記図2で説明したようにDSP6からの各値の読出をソフトウエア制御で行なう場合、必ずしも時間間隔が一定にならないことが通常である。これはつまり、マルチタスクで動いているソフトウエアは、その動作時間を厳密に決めることができず、また割り込み制御の場合でも、その優先順位が低い場合には、他の優先処理によって待たされる場合があるためである。
【0038】
このようなことを考えるとローパスフィルタに対する入力の時間間隔も不規則なものとなり、これに対して常に一定の時定数で処理することとすると、応答がぎくしゃくしたものとなってしまう。ソフトウエアとしての1つのタスクの最小実行時間を5msecとした場合、時間間隔の誤差はその整数倍の5〜10msecとなり、本実施例については、特に入力の時間間隔が5msecと短いものとなっているローパスフィルタ7について大きな影響としてあらわれる。なお、ローパスフィルタ8,9については、入力の時間間隔が100msecであり、誤差に対して十分に長い時間間隔であるため、殆ど影響はない。
このような入力間隔誤差に対応するために、本実施例のローパスフィルタ7では、入力間隔に応じて演算処理計数となる時定数を可変するようにしている。
【0039】
いま、ローパスフィルタに対する入力時間間隔をT、時定数をτ、入力をXi、出力をYiとすると、係数K=1−EXP(-T/τ)として、
Figure 0003867303
という関係になる。
通常のローパスフィルタでは、入力時間間隔Tを一定と考えられるため、予め係数Kの値を求めておけば、上記[式3]として乗算の回数は1回ですむことになる。
【0040】
ところが、入力時間間隔Tが変動する場合には、入力時間間隔Tに応じた係数Kを求めるために徐算と指数計算を行なわなくてはならず、ソフトウエアとしてのオーバヘッドは大きいものとなる。
そこで、各種の入力時間間隔Tの値に対応する係数Kの値を予め求めておき、これをいわゆるメモリテーブルとして保持しておくことで、徐算と指数計算は不要となり、処理を高速化することができる。
例えば実施例のローパスフィルタ7では、入力時間間隔Tとして1msec〜20msec迄の各値に対応する係数Kの値を記憶しておくようにすればよい。
【0041】
図3はローパスフィルタ7としての演算処理の流れを図式化したものである。ステップST1 として入力Xiがあると、ステップST2 としてその入力Xiのレベルが判断される。
入力Xiが上記した(表1)に示したアタックスレッショルドレベルTHD1より大きければ、入力XiとアタックスレッショルドレベルTHD1の差分に対してアタックゲインGAIN1 が付加される(ST4,ST5,ST6) 。
また入力XiがリカバリースレッショルドレベルTHD2より小さければ、入力XiとリカバリースレッショルドレベルTHD2の差分に対してリカバリーゲインGAIN2 が付加される(ST7,ST8,ST9) 。
入力XiのレベルがアタックスレッショルドレベルTHD1とリカバリースレッショルドレベルTHD2の間であれば、入力は『0』とされる(ST3) 。
【0042】
これらのレベルに応じた処理で得られた値が加算処理としてステップST10に送られることになる。
加算処理(ST10)には、前回の出力Yiに対してステップST19,ST20 で『−1』が乗算された値(−Yi)も供給されるため、加算処理(ST10)は、即ち上記[式3]における(Xi−Yi)の演算となる。
そしてこの加算処理出力に対してステップST11で係数Kの乗算処理が行なわれる。つまり上記[式3]におけるK(Xi−Yi)の演算となる。
さらに、K(Xi−Yi)の値はステップST16において値Yiと加算され、これによって[式3]の演算としてYi+K(Xi−Yi)が完了したことになり、つまり次の出力Yi+1がラッチ処理(ST17)を介して出力される(ST18)。
【0043】
ここで、係数Kとしては、加算処理(ST10)の結果が正の値であるか負の値であるかの判別処理(ST12)に応じて選択処理(ST15)で選択されるものである。つまり、係数Kを、アタックタイムTC1 としての時定数を設定するものか、リカバリータイムTC2 としての時定数を設定するものかが選択される。
アタックタイムTC1 としての時定数に関する係数KはステップST13として発生され、またリカバリータイムTC2 としての時定数を設定するの係数KはステップST14として発生されるが、上述したように入力時間間隔に応じて係数Kを変化させるようにするため、それぞれ、1msec〜20msecの20種類の入力時間間隔に応じて20種類の係数Kを保持している。
そして、入力時間間隔はステップ21としての処理で測定され、その測定時間に応じて、読み出される係数Kが決定されるものとなる。
【0044】
このように係数Kを予め保持しておき、入力時間間隔に応じて係数Kを発生させることで、ローパスフィルタ7としては入力時間間隔の変動に影響をうけない出力を得ることができ、これによってスムーズな応答を得ることができる。
【0045】
【発明の効果】
以上説明したように本発明のAGC回路は、減衰手段の減衰量を設定する基準値として、オーバーレート検出手段によって或る時間間隔において信号レベルが或る規定値を越えている時間の比率であるオーバーレートを検出するようにし、このオーバーレートに基づいて減衰制御量発生手段において減衰制御量を発生させるようにしているため、クリップが発生するような大入力の信号に対しても、そのピーク値を推定し、適切な減衰制御を行なうことが可能となり、速やかにクリップの発生しないレベルまでゲイン制御を行なうことが可能となるという効果がある。
また減衰制御量発生手段は、入力時間間隔の変動に対応して減衰制御量の算出のための係数を選択するようにしているため、ソフトウエア処理として実現する場合でも円滑なゲインコントロールが可能になる。
【図面の簡単な説明】
【図1】本発明の実施例のAGC回路のブロック図である。
【図2】実施例のAGC回路の処理のPADチャートである。
【図3】実施例のAGC回路のローパスフィルタの処理の説明図である。
【図4】実施例におけるオーバーレートに基づく減衰処理の説明図である。
【図5】実施例におけるオーバーレート検出の説明図である。
【図6】大振幅入力信号の場合のクリップの説明図である。
【符号の説明】
1 AGC回路
3 減衰器
5 A/D変換器
6 DSP
7,8,9 ローパスフィルタ
10 加算器[0001]
[Industrial application fields]
The present invention relates to an auto gain control circuit (hereinafter referred to as an AGC circuit) used in an audio signal transmission system or the like.
[0002]
[Prior art]
Conventionally, AGC circuits have been adopted in various devices. For example, in many digital audio tape recorders, the level of an audio signal serving as a recording signal is prevented from exceeding a certain level. Specifically, the audio signal is supplied to an attenuator and a predetermined amount of attenuation is executed. The attenuation is automatically controlled based on the detected value of the audio signal level. Yes.
For example, the detection value of the audio signal level used for the attenuation control is set to a peak detection value or an average value in a certain period.
[0003]
[Problems to be solved by the invention]
By the way, in the conventional AGC circuit, when a signal of a large level is suddenly input, the signal is clipped in the middle, and the detected peak value or average value is smaller than the actual value. It may end up.
For example, in FIG. 6, when a digital value “7FFFh” (a numerical value with “h” is expressed in hexadecimal) is a clip level, it is assumed that there is a large amplitude input as indicated by a solid line.
At this time, if the response of the AGC circuit to this input does not follow, the waveform is clipped as shown by the one-dot chain line in FIG.
[0004]
When the waveform is clipped in this manner, the level is naturally smaller than the actual level, that is, a peak value or an average value smaller than the actual value is detected. Since the amount of attenuation is controlled based on the detected value, the fact that a value smaller than the actual value is detected means that the response time for the input of the AGC circuit is delayed. Become. That is, it takes time to give an appropriate amount of attenuation to a large-amplitude input and prevent clipping.
For this reason, there is a problem that a signal is unavoidably clipped due to a sudden large-amplitude input, resulting in signal distortion.
[0005]
[Means for Solving the Problems]
  The present invention has been made in view of such a problem, and as a reference value for setting the attenuation amount of the attenuation means in the AGC circuit, the overrate detection means at a certain time interval.A / D conversion of the input signal and the digital data outputAn over rate that is a ratio of time during which the signal level exceeds a predetermined value is detected. Based on this overrate, the attenuation control amount generating means generates an attenuation control amount.
[0006]
  At this timeFor overrate detection by the overrate detection meansAboveThe attenuation control amount generating means is for calculating the attenuation control amount corresponding to the change in the time interval so that the responsiveness of the attenuation control amount to the attenuation means does not change when the time interval for measuring the signal level changes. The coefficient of is selected.
[0007]
[Action]
By detecting the time when the signal level exceeds a specified value in a certain time interval and obtaining the so-called over rate, even if a signal with a large amplitude that causes clipping is input, the over rate is It becomes a value according to the amount of amplitude. In other words, even if clipping occurs instantaneously and a proper peak value or average value cannot be obtained, the overrate can be calculated as a value according to the signal level, and by controlling the attenuation amount, A quick response can be realized.
[0008]
【Example】
Hereinafter, an embodiment of the AGC circuit of the present invention will be described with reference to FIGS.
FIG. 1 shows a configuration of an AGC circuit mounted on, for example, a recording device.
[0009]
The AGC circuit 1 indicated by the alternate long and short dash line is provided in the preceding stage of the recording device unit 20 that records an audio signal using a magnetic tape or the like as a recording medium. An audio signal as a recording signal is input from the terminal 2 to the AGC circuit 1 and supplied to the attenuator 3.
In the attenuator 3, the supplied attenuation control signal ATTS The input audio signal is attenuated and output in accordance with the attenuation amount.
The output of the attenuator 3 is supplied to the A / D converter 5 via the amplifier 4 and converted into digital data. The digital data is subjected to various required processes in a DSP (digital signal processor) 6.
[0010]
The digital data processed by the DSP 6 is supplied from the terminal 11 to the recording device unit 20 and is recorded from a magnetic head to a medium such as a magnetic tape. For example, the recording device 20 is realized by a DAT (digital audio tape) recording device.
As processing for supplying a recording signal to the recording device unit 20 in the DSP 6, data modulation, conversion to a recording format, addition of a code for error correction, addition of various control data, and the like are performed. .
[0011]
As the operation of the AGC circuit 1, the DSP 6 detects the peak level PK.LVL, the overrate OV.RATE, and the average value M.LVL from the input digital data, and outputs them.
The detected peak level PK.LVL and overrate OV.RATE are supplied to the low-pass filter 7.
The detected average value M.LVL is supplied to the low-pass filter 8 and the low-pass filter 9.
The outputs of the low-pass filters 7, 8, 9 are supplied to the adder 10 and subjected to arithmetic processing. The output of the adder 10 is the attenuation control signal ATT.S And supplied to the attenuator 3.
[0012]
As described above, the AGC circuit 1 according to the present embodiment uses the low-pass filters 7, 8, and 9 for the peak level PK.LVL, overrate OV.RATE, and average value M.LVL of the audio signal (digital data) detected by the DSP 6. The value obtained by injection is added to the attenuation control signal ATT.S Thus, a circuit system that automatically adjusts the gain of the input audio signal is configured.
[0013]
The detection operation of the peak level PK.LVL in the DSP 6 is executed by storing the maximum value of the input data. This is performed at regular intervals such as 5 msec. That is, by updating and storing the maximum value of the data that is sequentially input during the 5 msec period, the data value stored at the end of the 5 msec period is the peak level of the 5 msec period. It becomes PK.LVL. The stored peak level PK.LVL is read out and output to the low-pass filter 7 at the end of the 5 msec period. However, the stored value in the DSP 6 is cleared at this point, and again for the next 5 msec. The detection operation of the peak level PK.LVL in the period starts.
Note that the data for which the peak level PK.LVL is detected is data obtained by converting positive and negative values into absolute values for the input digital data (audio signal).
[0014]
The detection operation of the average value M.LVL in the DSP 6 is performed by integrating all input data. This is performed at regular intervals such as 100 msec. That is, the integrated value of data input within 100 msec is output to the low-pass filters 8 and 9 as the average value M.LVL. The accumulated value held in the DSP 6 is cleared when it is output to the low-pass filters 8 and 9, and the accumulation operation for the next 100 msec period is performed again.
The data for which the average value M.LVL is detected is also data obtained by converting positive and negative values into absolute values for the input digital data (audio signal).
For the convenience of processing, it is considered that the average value M.LVL cannot always be read from the DSP 6 every 100 msec. Therefore, a counter for counting the read cycle is also prepared. This counter is cleared by a read operation and incremented by a sampling clock.
[0015]
The overrate OV.RATE detected by the DSP 6 is a value counted by a counter that counts the number of data exceeding a certain level among the sample data as digital data from the A / D converter 5. Although the details of this counter will be described later, the value of this counter is converted to a percentage and is set to the overrate OV.RATE. For the sake of explanation, the counter count value is the overrate OV.RATE, and the counter count value is the percentage. The value converted to is the overrate% OV.RATE.
[0016]
This overrate OV.RATE is detected every 5 msec, for example, that is, a value obtained from the count value of the counter is read out every 5 msec and output to the low-pass filter 7. By this reading, the value of the counter is cleared and the counting operation is started in the next 5 msec period.
The data for which the overrate OV.RATE is detected is also absolute value data, and it is conceivable that reading from the DSP 6 cannot always be performed every 5 msec for convenience of processing, so the reading cycle is counted. A counter is also available. This counter is cleared by the read operation and incremented by the sampling clock, like the counter for the average value M.LVL.
[0017]
The overrate OV.RATE is detected by counting the number of data exceeding a certain level. For example, the certain level may be set to a level of about -1 dB which is the maximum value of digital data.
For example, when the digital data from the A / D converter 5 is viewed as a 16-bit two's complement expression, the maximum value of the data is “7FFFh” (= 32768). In this case, the overrate OV.RATE may be detected by counting the number of data exceeding “7FFDh”, for example.
[0018]
FIG. 5 shows the concept of detection of overrate OV.RATE. If there is data (audio signal) input such as (1) in the figure for a period of 5 msec, there is no data exceeding “7FFDh”, so the overrate OV.RATE = 0. On the other hand, if there is data (voice signal) input like (2) in the figure, TOVThe data for the period indicated by (dotted line portion) exceeds “7FFDh”. The number of data (number of samples) at this time is counted by the counter, and the overrate OV.RATE is detected.
For example, assuming that the sampling frequency of the A / D converter 5 is 32 KHz, data of 160 samples is input in a 5 msec period. And T in FIG.OVAssuming that the period is 2 msec, the value counted by the counter is “64” (64 samples). Therefore, the overrate OV.RATE = 64. The overrate% OV.RATE as a percentage is (64/160) × 100 = 40%.
[0019]
The low pass filters 7, 8, and 9 in FIG. 1 may have the same configuration, but the parameters of the attack threshold level THD1, the recovery threshold level THD2, the attack gain GAIN1, the recovery gain GAIN2, the attack time TC1, and the recovery time TC2 are as follows. As shown in (Table 1), they are different.
[Table 1]
Figure 0003867303
[0020]
The low-pass filter 7 receives the peak level PK.LVL or the overrate OV.RATE supplied from the DSP 6 and has a fast response time constant of several milliseconds.
The low-pass filter 8 receives the average value M.LVL from the DSP 6, the response time constant is intermediate to several tens of milliseconds, and the low-pass filter 9 also receives the average value M.LVL from the DSP 6, The response time constant is set to a relatively slow value of several hundred msec.
[0021]
As described above, the outputs of the low-pass filters 7, 8, 9 are added by the adder 10 and the attenuation control signal ATTS However, if the overrate OV.RATE is not considered in the configuration of FIG. 1, a so-called normal AGC loop is realized.
That is, in this embodiment, the attenuation control signal ATT is used by using the overrate OV.RATE.S Where the over-rate OV.RATE is set to the attenuation control signal ATT.S The case where it is taken in as an element of generating will be described.
[0022]
  Assume that the audio signal input to the AGC circuit 1 is a sine wave. At this time, if the overrate% OV.RATE is the value Ova shown in FIG.U The amount indicated by is a so-called level-over amount. So the value ATU If the attenuation amount of the attenuator 3 is increased by an amount corresponding to, the gain of the audio signal can be set to a level at which clipping is not performed.
  Here, if the attenuation is represented by Y (dB), the attenuation Y corresponding to the overrate% OV.RATE is
  Y = 20 × log (1/cos (0.5π ・ (% OV.RATE) / 100))
Can be obtained.
  That is, an appropriate attenuation amount Y corresponding to the overrate% OV.RATE can be calculated.
[0023]
  However, if the calculation is performed as it is, the overhead as software processing increases, so the attenuation Y is obtained by the following equation. Note that when the count value for the overrate OV.RATE is 256, the overrate% OV.RATE = 100%. Overrate% OVIf .RATE is X,
  When 0 <X ≦ 32: Y = (X + 4) · (X + 4) / 2 (1)
  When 32 <X: Y = (X−16) · X [Expression 2]
  In this equation, the error increases when the overrate OV.RATE ≧ 200. However, if the attenuation is excessively large, problems such as oscillation occur. Rather it will be convenient.
  The attenuation amount Y calculated in this way is the attenuation control signal ATT.S It becomes one element of generation.
[0024]
Thus, in this embodiment, the attenuation control signal ATT is used by using the overrate OV.RATE.S Is generated.
In the AGC circuit 1, the operation for controlling the amount of attenuation with respect to the attenuator 3 requires reading of each data in the DSP 6, calculation as the low-pass filters 7, 8, 9 and calculation of the adder 10. These processes can actually be realized by software using a microprocessor.
Before describing the software processing by the microprocessor in detail, the overall operation will be briefly described as follows.
[0025]
The DSP 6 supplies the peak level PK.LVL and the overrate OV.RATE to the arithmetic processing as the low-pass filter 7 every 5 msec. At this time, if the overrate OV.RATE = 0, the peak level PK.LVL is used for the calculation processing as the low-pass filter 7, that is, the input for the calculation according to the parameters of (Table 1) described above. If the overrate OV.RATE is not 0, the processing as the low-pass filter 7 is performed using the value Y obtained by the above-described [Expression 1] and [Expression 2].
[0026]
Normally, the value input to the low-pass filter has a slow response due to the time constant, but when calculating using the overrate OV.RATE as an input, the value Y is directly output with the time constant set to zero. It may be. This is because, as described above, a suitable attenuation amount can be found for the value of the audio signal.
[0027]
On the other hand, for the low-pass filters 8 and 9, the DSP 6 supplies the average value M.LVL every 100 msec, and the arithmetic processing as the low-pass filters 8 and 9 is performed.
The outputs of the three low-pass filters 7, 8, 9 are added by the arithmetic processing as the adder 10, and the attenuation control signal ATTS Is generated.
By such an operation, the AGC circuit 1 of the present embodiment allows the attenuation control signal ATT based on the average value M.LVL and the peak level PK.LVL if the level of the input audio signal is within the normal (not clipped) range.S On the other hand, if there is a large amplitude input that causes clipping, the attenuation control signal ATTS The over-rate OV.RATE is used to generate the signal, and the operation of estimating the amplitude of the input audio signal and giving an appropriate amount of attenuation is performed, and automatic gain adjustment is performed so that the response is good and the signal is not clipped. Will be performed.
[0028]
Software processing by the microprocessor for realizing such operation will be described with reference to the PAD chart of FIG.
In the AGC process, first, various parameters are initialized (P101), and then the timer TM is first reset to zero. This timer TM is for determining a period of 100 msec.
Then, as Step P103, the processes of Steps P104 to P122 are repeated every 5 msec.
As the processing every 5 msec, first, the timer TM is incremented (P104). Next, it is determined whether or not the value of the timer TM is “20” or more.
The timer TM is reset in step P102 or P106, and the value of the timer TM becomes “20” or more when 100 msec has elapsed.
[0029]
When the value of the timer TM reaches “20”, that is, when the cycle timing is 100 msec, the timer TM is reset in the process of step P106, and then the average value M.LVL is read from the DSP 6. That is, the integrated value of the data input to the DSP 6 is read during the 100 msec period up to that point.
Then, the average value M.LVL is input to obtain the output of the low-pass filter 8 (P108), and the average value M.LVL is also input to obtain the output of the low-pass filter 9 (P109).
That is, the processes of Steps P106 to P109 are performed every 100 msec for the low-pass filters 8 and 9.
[0030]
After the processing of Steps P106 to P109 is performed, or when it is determined in Step P105 that the value of the timer TM has not reached “20”, the processing of Step P110 is performed without performing the processing of Steps P106 to P109. Done. That is, the processing at each timing of the 5 msec cycle always proceeds to Step P110. In step P110, the peak level PK.LVL and the overrate OV.RATE are read from the DSP 6.
[0031]
  Next, it is determined whether or not the read overrate OV.RATE is greater than “0” (P111). When the overrate OV.RATE is larger than “0”, that is, when a large amplitude audio signal is input, the limit level LMT.LVL is obtained from the overrate OV.RATE as the processing of step P112.
  The processing in step P112 corresponds to the above-described [Expression 1] and [Expression 2]. That is, first, the overrate OV.RATE is converted into an overrate% OV.RATE as a percentage. And for example overrate% OVWhen .RATE is 32 or less, [Equation 1] is used, and the limit level LMT.LVL is
  LMT.LVL = (% OV.RATE +4) ・ (% OV.RATE +4) / 2
And overrate% OVIf .RATE is greater than 32, [Equation 2] is used and the limit level LMT.LVL is
  LMT.LVL = (% OV.RATE-16) ・ (% OV.RATE)
As required.
[0032]
On the other hand, if it is determined in step P111 that the overrate OV.RATE = 0, is the peak level PK.LVL read out in step P113 greater than the limit threshold level LMT.THD set to a certain value? It is determined whether or not.
If the peak level PK.LVL is greater than the limit threshold level LMT.THD, the limit level LMT.LVL is obtained from the peak level PK.LVL in step P114. That is, the difference between the peak level PK.LVL and the limit threshold level LMT.THD is multiplied by the limit gain LMT.GAIN set to a predetermined value, and this is set to the limit level LMT.LVL.
If it is determined in step P113 that the peak level PK.LVL is equal to or lower than the limit threshold level LMT.THD, the limit level LMT.LVL = 0 is set in step P115.
[0033]
When the limit level LMT.LVL is obtained in the processing of Steps P111 to P115, using it as an input, the output of the low-pass filter 7 is obtained in Step P116.
When the output of the low-pass filter 7 is obtained, the added value LPF.SUM of the low-pass filters 7, 8, 9 is calculated in step P117 as a process corresponding to the adder 10 in FIG.
The added value LPF.SUM is a value obtained by adding the outputs of the low-pass filters 7, 8, 9 and the offset value. The outputs of the low-pass filters 8 and 9 are values obtained in steps P108 and P109 before that time. The offset value is a value corresponding to an attenuation amount when a reference level audio signal is input.
[0034]
When the addition value LPF.SUM is obtained, a backlash element is added so that the attenuation amount does not unnecessarily change as the attenuation operation. Therefore, in step P118, the addition value LPF.SUM and the control signal value ATT at that time (previous)S And the addition value LPF.SUM is the control signal value ATT.S If the value exceeds the value, add the value LPF.SUM to the current attenuation control signal value ATT.S Set as (P119).
On the other hand, the addition value LPF.SUM is the previous control signal value ATT.S If it is below, then the previous control signal value ATTS And the value obtained by adding the backlash value BL to the added value LPF.SUM (P120). In this comparison operation, the previous control signal value ATTS Is obtained, the value obtained by adding the backlash value BL to the added value LPF.SUM is set to the current attenuation control signal value ATT.S Set as (P121).
If a negative result is obtained in step P120, the attenuation control signal value ATTS Will not be updated.
[0035]
With the above processing, attenuation control signal value ATTS Is set, the attenuation control signal value ATT is processed as a process of step P122.S Is supplied to the attenuator 3 to execute the attenuating operation.
By repeating the processing of FIG. 2 every 5 msec, a suitable automatic gain adjustment is realized without causing clipping on the input audio signal.
[0036]
In such an AGC circuit 1, when the attenuator 3 changes the amount of attenuation by the step method, it is preferable to change the gain when the input signal level is zero. This is because if the gain is changed when the amplitude is large, the amplitude of the signal changes on a step and a so-called petit sound is heard. However, in the case of a large-amplitude input that causes an overrate, it is effective to change the gain promptly regardless of the level of the input signal so that distortion does not increase.
[0037]
By the way, as described with reference to FIG. 2, when reading each value from the DSP 6 by software control, it is normal that the time interval is not always constant. This means that multitasking software cannot determine its operation time strictly, and even in the case of interrupt control, if its priority is low, it will be waited for by other priority processing. Because there is.
[0038]
Considering this, the time interval of input to the low-pass filter is also irregular, and if it is always processed with a constant time constant, the response will be jerky. When the minimum execution time of one task as software is 5 msec, the time interval error is an integer multiple of 5 to 10 msec. In this embodiment, the input time interval is particularly short as 5 msec. The low-pass filter 7 that is present appears as a great influence. Note that the low-pass filters 8 and 9 have almost no effect because the input time interval is 100 msec, which is a sufficiently long time interval for errors.
In order to cope with such an input interval error, the low-pass filter 7 of this embodiment is configured to vary the time constant that is the arithmetic processing count in accordance with the input interval.
[0039]
Now, assuming that the input time interval for the low-pass filter is T, the time constant is τ, the input is Xi, and the output is Yi, the coefficient K = 1−EXP (−T / τ)
Figure 0003867303
It becomes the relationship.
In a normal low-pass filter, since the input time interval T is considered to be constant, if the value of the coefficient K is obtained in advance, the number of multiplications is only one as in [Equation 3].
[0040]
However, when the input time interval T fluctuates, in order to obtain the coefficient K corresponding to the input time interval T, it is necessary to perform slow calculation and exponent calculation, and the overhead as software becomes large.
Therefore, by previously obtaining the value of the coefficient K corresponding to the value of various input time intervals T and holding it as a so-called memory table, the gradual calculation and the exponent calculation become unnecessary, and the processing is speeded up. be able to.
For example, in the low-pass filter 7 of the embodiment, the value of the coefficient K corresponding to each value from 1 msec to 20 msec may be stored as the input time interval T.
[0041]
FIG. 3 schematically shows the flow of arithmetic processing as the low-pass filter 7. If there is an input Xi as step ST1, the level of the input Xi is judged as step ST2.
If the input Xi is greater than the above-described attack threshold level THD1, the attack gain GAIN1 is added to the difference between the input Xi and the attack threshold level THD1 (ST4, ST5, ST6).
If the input Xi is smaller than the recovery threshold level THD2, the recovery gain GAIN2 is added to the difference between the input Xi and the recovery threshold level THD2 (ST7, ST8, ST9).
If the level of the input Xi is between the attack threshold level THD1 and the recovery threshold level THD2, the input is set to “0” (ST3).
[0042]
Values obtained by processing according to these levels are sent to step ST10 as addition processing.
Since the value (-Yi) obtained by multiplying the previous output Yi by "-1" in steps ST19 and ST20 is also supplied to the addition process (ST10), 3] in (Xi−Yi).
Then, a multiplication process of a coefficient K is performed on the output of the addition process in step ST11. That is, the calculation of K (Xi−Yi) in the above [Expression 3] is performed.
Further, the value of K (Xi−Yi) is added to the value Yi in step ST16, whereby Yi + K (Xi−Yi) is completed as the calculation of [Expression 3], that is, the next output Yi + 1 is latched. It is output via (ST17) (ST18).
[0043]
Here, the coefficient K is selected in the selection process (ST15) according to the determination process (ST12) of whether the result of the addition process (ST10) is a positive value or a negative value. That is, the coefficient K is selected to set a time constant as the attack time TC1 or to set a time constant as the recovery time TC2.
The coefficient K related to the time constant as the attack time TC1 is generated as step ST13, and the coefficient K for setting the time constant as the recovery time TC2 is generated as step ST14. As described above, the coefficient K is set according to the input time interval. In order to change the coefficient K, 20 kinds of coefficients K are held according to 20 kinds of input time intervals of 1 msec to 20 msec, respectively.
Then, the input time interval is measured by the processing as step 21, and the coefficient K to be read is determined according to the measurement time.
[0044]
In this way, by holding the coefficient K in advance and generating the coefficient K according to the input time interval, the low-pass filter 7 can obtain an output that is not affected by fluctuations in the input time interval. A smooth response can be obtained.
[0045]
【The invention's effect】
As described above, the AGC circuit of the present invention is the ratio of the time when the signal level exceeds a specified value in a certain time interval by the overrate detection means as the reference value for setting the attenuation amount of the attenuation means. Since the over rate is detected and the attenuation control amount is generated in the attenuation control amount generation means based on the over rate, the peak value is also obtained for a large input signal that causes clipping. Thus, it is possible to perform appropriate attenuation control, and gain control can be quickly performed to a level at which clipping does not occur.
In addition, since the attenuation control amount generation means selects the coefficient for calculating the attenuation control amount in response to fluctuations in the input time interval, smooth gain control is possible even when implemented as software processing. Become.
[Brief description of the drawings]
FIG. 1 is a block diagram of an AGC circuit according to an embodiment of the present invention.
FIG. 2 is a PAD chart of processing of the AGC circuit according to the embodiment.
FIG. 3 is an explanatory diagram of low-pass filter processing of the AGC circuit according to the embodiment.
FIG. 4 is an explanatory diagram of an attenuation process based on an over rate in the embodiment.
FIG. 5 is an explanatory diagram of overrate detection in the embodiment.
FIG. 6 is an explanatory diagram of a clip in the case of a large amplitude input signal.
[Explanation of symbols]
1 AGC circuit
3 Attenuator
5 A / D converter
6 DSP
7, 8, 9 Low-pass filter
10 Adder

Claims (1)

或る時間間隔において、入力された信号をA/D変換して出力されたデジタルデータの信号レベルが或る規定値を越えている時間の比率であるオーバーレートを検出するオーバーレート検出手段と、
前記オーバーレート検出手段によって検出されたオーバーレートを用いて減衰制御量を発生させることのできる減衰制御量発生手段と、
前記減衰制御量発生手段によって発生された減衰制御量に基づいて入力信号の減衰動作を行なう減衰手段と、
を備え、
前記減衰制御量発生手段は、前記オーバーレート検出手段によるオーバーレート検出動作のための前記信号レベルの測定を行なう時間間隔が変動した場合に前記減衰手段に対する減衰制御量の応答性が変動しないように、時間間隔の変動に対応して減衰制御量の算出のための係数を選択すること
を特徴とするオートゲインコントロール回路。
An over-rate detecting means for detecting an over-rate which is a ratio of time during which a signal level of digital data output by A / D converting an input signal in a certain time interval exceeds a specified value;
An attenuation control amount generating means capable of generating an attenuation control amount using the overrate detected by the overrate detecting means;
Attenuating means for attenuating the input signal based on the attenuation control amount generated by the attenuation control amount generating means;
With
The attenuation control amount generation means prevents the response of the attenuation control amount to the attenuation means from changing when the time interval for measuring the signal level for the overrate detection operation by the overrate detection means changes. An automatic gain control circuit that selects a coefficient for calculating an attenuation control amount corresponding to a change in time interval .
JP12565095A 1995-04-27 1995-04-27 Auto gain control circuit Expired - Fee Related JP3867303B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12565095A JP3867303B2 (en) 1995-04-27 1995-04-27 Auto gain control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12565095A JP3867303B2 (en) 1995-04-27 1995-04-27 Auto gain control circuit

Publications (2)

Publication Number Publication Date
JPH08297923A JPH08297923A (en) 1996-11-12
JP3867303B2 true JP3867303B2 (en) 2007-01-10

Family

ID=14915272

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12565095A Expired - Fee Related JP3867303B2 (en) 1995-04-27 1995-04-27 Auto gain control circuit

Country Status (1)

Country Link
JP (1) JP3867303B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60224185T2 (en) * 2001-06-25 2008-12-11 Koninklijke Philips Electronics N.V. DISTORTION DETECTOR

Also Published As

Publication number Publication date
JPH08297923A (en) 1996-11-12

Similar Documents

Publication Publication Date Title
KR100886575B1 (en) Loudspeaker Protection System with Frequency Band Selective Audio Power Control
US7254242B2 (en) Acoustic signal processing apparatus and method, and audio device
EP1203509B1 (en) Feedback cancellation using bandwidth detection
US7155385B2 (en) Automatic gain control for adjusting gain during non-speech portions
JP2827240B2 (en) Gain adjuster
US8300843B2 (en) Sound effect circuit and processing method
JP3867303B2 (en) Auto gain control circuit
JP3194135B2 (en) Digital audio processor
US5923768A (en) Digital audio processing
FR3133111A1 (en) Method and system for improving the sound reproduction of the low frequencies of an audio signal
JPH09130180A (en) Auto gain control circuit
JPH0991887A (en) Digital signal processing method and device
JP2681957B2 (en) Digital signal processor
EP0336684A2 (en) Noise reduction in the playback of recorded sound
JP3209397B2 (en) Floating A / D converter
GB2310985A (en) Digital audio processing
US12543009B2 (en) Determining an acoustic characteristic of a hearing instrument
JP3119677B2 (en) Signal processing circuit
JP3505722B2 (en) Signal level control device
JP3681559B2 (en) Compression processing method and apparatus
JP3541263B2 (en) Gain setting method
US20010014068A1 (en) Device and method for preventing excess current flowing into pick-up head of optical storage device
JPH10117115A (en) Dynamic low-pass amplifier
JPH11312939A (en) Integration device
JP2900851B2 (en) File usage output / monitoring device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051227

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060808

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060817

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060919

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061002

LAPS Cancellation because of no payment of annual fees