CN101370056B - Digital audio automatic gain control method and its system - Google Patents

Digital audio automatic gain control method and its system Download PDF

Info

Publication number
CN101370056B
CN101370056B CN 200710094025 CN200710094025A CN101370056B CN 101370056 B CN101370056 B CN 101370056B CN 200710094025 CN200710094025 CN 200710094025 CN 200710094025 A CN200710094025 A CN 200710094025A CN 101370056 B CN101370056 B CN 101370056B
Authority
CN
China
Prior art keywords
signal
power
gain
adaptive
gain coefficient
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
CN 200710094025
Other languages
Chinese (zh)
Other versions
CN101370056A (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.)
Shanghai Jade Technologies Co., Ltd.
Original Assignee
SHANGHAI JADE TECHNOLOGIES Co Ltd
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 SHANGHAI JADE TECHNOLOGIES Co Ltd filed Critical SHANGHAI JADE TECHNOLOGIES Co Ltd
Priority to CN 200710094025 priority Critical patent/CN101370056B/en
Publication of CN101370056A publication Critical patent/CN101370056A/en
Application granted granted Critical
Publication of CN101370056B publication Critical patent/CN101370056B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Amplification And Gain Control (AREA)

Abstract

The invention discloses a automatic gain control method for digital audio frequency comprising following steps: (1) computing instant power of input signal, (2) detecting if signal of step 1 is background noise, (3) updating gain coefficient g(n) according to power information of input signal of step 1 and self-adaptive filtering study step update, (4) producing new output signal according to new gain coefficient of step 3, (5) computing instant power of output signal, (6) shaping gain (7) performing saturation control and output digital audio frequency signal. The inventive digital audio frequency automatic gain system comprises: a first power computing module, self-adaptive filter module, a second power computing module and gain shaping module. The inventive method and system can automatically control gain for digital audio frequency signal, enable output signal more balanced and smooth, and can be used in voice communication and recording system.

Description

Digital audio automatic gain control method and system thereof
Technical field
The present invention relates to a kind of automatic gain control, relate to a kind of DAB automatic gain control that voice communication, audio/video conference and digital recording etc. are used that is applied to more specifically.
Background technology
(Automatic Gain Control is to be used for digital audio and video signals is done the automatic dynamic gain controlling AGC), makes the user-defined echo signal level that trends towards of signal level finally to obtain the harmonious voice of balance for DAB automatic gain control.This technology generally is used for voice communication and recording system, and concrete the application comprises audio/video conference, the networking telephone, digital recording etc.Distortion does not to a certain degree appear in the signal after digital audio automatic gain control method can guarantee to gain efficiently, and can not gain to background noise.Existing digital AGC technology generally is through comparing the amplitude equalizing value and the predefined AGC thresholding R of phase of history speech output signal, with the variation of ride gain, if amplitude equalizing value surpasses thresholding R, then increases gain, then reduces gain on the contrary.This type gain method is to become in non-linear, time; Owing to can not combine the variation of current demand signal energy and the variation of historical signal energy to come adjustment gain automatically neatly; Can make that so the bigger signal gain of portion of energy is excessive; Cause overflowing, the less signal of portion of energy but gains inadequately, can destroy the continuity of signal and introduce uncomfortable noise and the signal energy of overflowing is done the peak clipping processing simply.And existing technology is seldom considered the situation that has background noise in the gain control process.
Summary of the invention
The technical problem that the present invention will solve provides a kind of digital audio automatic gain control method, and distortion does not to a certain degree appear in the signal after it can guarantee to gain, and background noise is not gained.For this reason, the present invention also will provide a kind of DAB AGC system.
For solving the problems of the technologies described above, digital audio automatic gain control method of the present invention, it may further comprise the steps:
(1) the instantaneous power P of calculating input signal x (n) x(n);
(2) whether be background noise according to the signal in the power detection step (1), the instantaneous power P of input signal in the step (1) x(n) be lower than and preset power P Min, be background noise, directly carry out saturated control and output; Instantaneous power P x(n) greater than presetting power P Min, get into next step;
(3) upgrade according to the power information and the adaptive-filtering study step-length of the input signal of step (1), upgrade gain coefficient g (n);
(4) utilize new gain coefficient in the step (3), produce new output signal y (n)=g (n) x (n);
(5) calculate the instantaneous power P that exports signal y (n) yAnd utilize the instantaneous power P of estimation (n), y(n) with the echo signal power P of preassignment RefAsk irregular energy, and it is fed back to the gain coefficient lastest imformation of step (3) as next signal;
(6) according to the power P of input signal x(n), the shaping that gains;
(7) carry out saturated control and outputting digital audio signal.
DAB AGC system of the present invention is used for the automatic gain digital audio and video signals, and it comprises one first power computation module, is used to calculate the power of input signal; One adaptive-filtering module is used to receive the signal from said first power computation module and output, upgrades gain coefficient, and produces new output signal according to new gain coefficient; One second power computation module is used to calculate the power from the adaptive-filtering module output signal, and feedback signal to adaptive-filtering module, as the gain coefficient lastest imformation of next signal; One gain Shaping Module is used for the signal from adaptive-filtering module output is carried out the gain coefficient adjustment, with the excessive situation of reduction gain coefficient with strengthen the too small situation of gain coefficient, the signal of output after the shaping that gains.
DAB AGC system of the present invention and method; Through upgrading the gain coefficient of the digital audio and video signals of importing; And produce new output signal according to the gain coefficient of this renewal, to the shaping that gains of new output signal, excessive gain and strengthen too small gain effect weakens; The digital audio and video signals that distortion to a certain degree do not occur and background noise is not gained after output one gain makes voice after the processing reach perfect distance and holds weighing apparatus level with both hands.
Description of drawings
Below in conjunction with accompanying drawing and embodiment the present invention is done further detailed explanation:
Fig. 1 is the sketch map of DAB adaptive gain control system of the present invention;
Fig. 2 is the flow chart of DAB adaptive gain control method of the present invention;
Fig. 3 is the sketch map of an instance input signal of the present invention and output signal;
Fig. 4 changes sketch map for the embodiments of the invention gain coefficient;
Fig. 5 is the sketch map of another instance input signal of the present invention and output signal.
Embodiment
Fig. 1 is the sketch map of DAB AGC system of the present invention, is divided into following functional module:
(1) first power computation module 101.This module is used to calculate the power P of input signal x (n) x(n), wherein n is the time sequence number.Computing formula can be
P x(n)=αP x(n-1)+(1-α)x 2(n) (1)
Wherein α is a smoothing factor, and α is big more, and then variable power is mild more; α is more little, and then power changes with the rapid variation of signal.For the fluctuation that better reflects signal and be unlikely to violent shake, generally select 0<α<<1.
(2) the adaptive-filtering module 103.This module comprises three sub-module: adaptive-filtering study step-length update module, filter factor update module and new output calculated signals module.Filter factor, promptly the more new formula of gain coefficient g (n) does
g(n)=g(n-1)(1+μ(n)P x(n)(P ref-P y(n-1))) (3)
Wherein μ (n) is the study step-length of adaptive-filtering, P RefBe a constant, representative of consumer expected objective signal energy level.Adaptive-filtering study step-length more new formula does
μ ( n ) = μ 0 γ + P x ( n ) - - - ( 4 )
μ 0Be the constant between 0 to 1, μ 0Value have influence on the convergence rate and the stability of adaptive algorithm, bigger μ 0Can cause restraining faster, but the less stable after the convergence, less μ 0Can make that algorithmic statement is slack-off, but the stability after the convergence better, in order to consider convergence of algorithm speed and stability, operated by rotary motion μ simultaneously 0Between 0 to 0.1.γ approaches 0 the disturbance factor, the constant of scope between 0 to 0.1, and the purpose of γ is in order to prevent that denominator from being 0, so generally get the value below 0.1 in this formula.Utilize new gain coefficient, produce new output signal y (n), computing formula does
y ( n ) = g ( n ) x ( n ) , P x ( n ) &GreaterEqual; P min x ( n ) , P x ( n ) < P min - - - ( 5 )
(3) second power computation module 102.This module is used to calculate y (n) power P of output signal y(n), wherein n is the time sequence number.Computing formula can be
P y(n)=αP y(n-1)+(1-α)y 2(n) (2)
0<α<<1 wherein.And result of calculation fed back to the gain coefficient lastest imformation of adaptive-filtering module 103 as next signal.
(4) gain Shaping Module 104.Signal from 103 outputs of adaptive-filtering module is carried out the gain coefficient adjustment, and computing formula does
Y (n)=K 1Y (n) (+K 2(P a-P x(n))) (work as P a<P x(n)<P b) (6)
P wherein MinBe the minimum signal power threshold values of gain, instantaneous power is lower than P MinSignal be background noise, do not carry out gain controlling.K 1And K 2Be constant coefficient, 0.5≤K 1≤1,1≤K 2≤8, K 1Effect be as required the overall magnitude of signal to be certain adjustment, K 1Value is 1 o'clock, and signal integral body does not gain, K 2Effect according to the fluctuation of signal, the adjustment of certain ratio, K are done in the part of signal 2Value can obtain preferably effect during integer 1 between 8.P aAnd P bThe lower limit and the upper limit for the signal energy that needs shaping.The purpose of gain shaping is two kinds of situation when adjusting gain coefficient, to occur in order to overcome adaptive filter algorithm: (1) is when gain coefficient is excessive; The energy rank of input signal is also excessive, and it is excessive at this time may to gain, even signal overflows; At this time need do the gain finishing, the reduction gain; When (2) gain coefficient was too small, the energy rank of input signal was too small, and at this time gain effect is obvious inadequately, needed the finishing coefficient, strengthened gain effect.Adaptive filter algorithm has certain robustness, and gain coefficient (weight) is not to change along with the rapid variation of the waveform of signal fully, and the amplitude of coefficient adjustment has certain delay, therefore, need do corresponding gain finishing according to the fluctuation of signal.
Fig. 2 is the flow chart of the inventive method, and it may further comprise the steps:
Step 401, the instantaneous power P of estimation input signal x (n) x(n), the power calculation method is taked the method for above-mentioned formula (1).
Step 402, whether the power detection of calculating according to step 401 is background noise, the detection method of background noise takes to set P MinBeing the minimum signal power threshold values, being worth less than this like current demand signal power, then is the direct execution in step 407 of background noise, otherwise order execution in step 403.
Step 403 is upgraded according to power information of calculating and adaptive-filtering study step-length, upgrades gain coefficient g (n), and more new formula is taked above-mentioned formula (3), and the study step-length of adaptive-filtering is upgraded and taked above-mentioned formula (4).
Step 404 is utilized new gain coefficient, produces new output signal, and computing formula is y (n)=g (n) x (n).
Step 405 is calculated the instantaneous power P that exports signal y (n) y(n), the power calculation method is taked the method for above-mentioned formula (2).And the instantaneous power P of utilization calculating y(n) with the echo signal power P of user's preassignment RefAsk irregular energy, and it is fed back to the gain coefficient lastest imformation of step 403 as next signal.
Step 406 is according to the power P of input signal x(n), the finishing that gains further improves voice quality, and the computational methods of gain shaping are taked the method for above-mentioned formula (6).
Step 407 is carried out saturated control and output signal y (n), and the purpose of saturated control is to overflow for control signal; If input signal is the 16bitPCM code stream; Then saturated control makes the scope of 16bit output signal be [32768 ,+32767], and the output greater than 32767 is set to 32767; Output less than-32768 is set to-32768, and other output is constant.
When importing new voice signal x (n), repeat above step.
Fig. 3 has provided and has used automatic gain control (AGC) method of the present invention that the voice in one period 3 second are carried out process result figure.Fig. 4 has provided the change curve of AGC to the gain coefficient of this section voice; Gain coefficient (original gain coefficient) that does not pass through shaping and the contrast of passing through the gain coefficient of shaping have been write down; It is thus clear that after the gain trimming, the voice signal of output balance more is harmonious; And when background noise, gain coefficient equals 1.In this instance, the AGC selection of parameter is following: the α in formula (1) and the formula (2) gets 0.05, μ in the formula (4) 0Get 0.03125 and 0.001 respectively with γ, K in the formula (6) 1, K 2, P aAnd P bGet 0.5,2,0.001 and 0.1 respectively, P in the formula (5) MinGet 0.0008, represent the power of background noise, P in the formula (3) RefGet 0.15, represent echo signal power.
Fig. 5 has provided and has used automatic gain control (AGC) method of the present invention that the voice in 6 seconds of another section are carried out process result figure.In this instance, K in the formula (6) 1, K 2Get 0.8 and 4 respectively, the echo signal power P in the formula (3) RefGet 0.2, other values of parameters are identical with the value of instance among Fig. 3.Can find out that from Fig. 3 and Fig. 5 gain effect is more satisfactory, and the background noise part is not gained.

Claims (5)

1. a digital audio automatic gain control method is used for the automatic gain digital audio and video signals, it is characterized in that it may further comprise the steps:
(1) the instantaneous power P of calculating input signal x (n) x(n);
(2) whether be background noise according to the signal in the power detection step (1), the instantaneous power P of input signal in the step (1) x(n) be lower than and preset power P Min, be background noise, directly carry out saturated control and output; Instantaneous power P x(n) greater than presetting power P Min, get into next step;
(3) according to the power information of the input signal of step (1) and the adaptive-filtering step-length information of renewal, upgrade gain coefficient g (n);
A kind of variable step update method based on variable power is taked in the renewal of said step (3) gain coefficient, and its computing formula is g (n)=g (n-1) (1+ μ (n) P x(n) (P Ref-P y(n-1))), wherein μ (n) is the step-length of adaptive-filtering, P RefBe a constant, representative of consumer expected objective signal energy level; The step-length of adaptive-filtering more new formula does μ 0Value is between 0 to 1, and γ approaches 0 the disturbance factor, and span is between 0 to 0.1;
(4) utilize new gain coefficient in the step (3), produce new output signal y (n);
(5) calculate the instantaneous power P that exports signal yAnd feed back to the gain coefficient lastest imformation of step (3) (n), as next signal;
(6) according to the power P of input signal x(n), the shaping that gains;
The computing formula of said step (6) gain shaping is: y (n)=K 1Y (n) (1+K 2(P a-P x(n))) (work as P a<P x(n)<P b), K wherein 1And K 2Be constant coefficient, 0.5≤K 1≤1,1≤K 2≤8, P aAnd P bThe lower limit and the upper limit for the signal energy that needs shaping;
(7) carry out saturated control and outputting digital audio signal.
2. control method according to claim 1 is characterized in that: the power calculation method in said step (1) and the step (5) is respectively P x(n)=α P x(n-1)+(1-α) x 2(n) and P y(n)=α P y(n-1)+(1-α) y 2(n), 0<α<<1 wherein.
3. control method according to claim 1 is characterized in that: the computing formula of new output signal y (n) does in the said step (4) y ( n ) = g ( n ) x ( n ) , P x ( n ) &GreaterEqual; P Min x ( n ) , P x ( n ) < P Min .
4. a DAB AGC system is used for the automatic gain digital audio and video signals, it is characterized in that: it comprises one first power computation module, is used to calculate the instantaneous power P of input signal x (n) x(n); One adaptive-filtering module is used to receive the signal of first power computation module, adopts and upgrades gain coefficient g (n) based on the variable step update mechanism of input signal instantaneous power, and produce new output signal y (n) according to new gain coefficient; One second power computation module is used to calculate the instantaneous power P from the adaptive-filtering module output signal y(n), and feedback signal power to adaptive-filtering module, as the gain coefficient lastest imformation of next signal; One gain Shaping Module is used for the signal from adaptive-filtering module output is carried out the gain coefficient adjustment, with the excessive situation of reduction gain coefficient with strengthen the too small situation of gain coefficient, the signal of output after the shaping that gains;
The computing formula of said variable step update mechanism based on the input signal instantaneous power is g (n)=g (n-1) (1+ μ (n) P x(n) (P Ref-P y(n-1))), wherein μ (n) is the step-length of adaptive-filtering, P RefBe a constant, representative of consumer expected objective signal energy level; The step-length of adaptive-filtering more new formula does μ 0Value is between 0 to 1, and γ approaches 0 the disturbance factor, and span is between 0 to 0.1;
The computing formula of said gain coefficient adjustment is: y (n)=K 1Y (n) (1+K 2(P a-P x(n))) (work as P a<P x(n)<P b), K wherein 1And K 2Be constant coefficient, 0.5≤K 1≤1,1≤K 2≤8, P aAnd P bThe lower limit and the upper limit for the signal energy that needs shaping.
5. control system according to claim 4 is characterized in that: said adaptive-filtering module comprises adaptive-filtering study step-length update module, is used for upgrading adaptive learning step size mu (n) according to the signal power of first power computation module; The filter factor update module is used for according to adaptive updates step size mu (n) and a last power from the adaptive-filtering module output signal, upgrades gain coefficient g (n); And new output calculated signals module, be used for calculating new output signal y (n) according to new gain coefficient.
CN 200710094025 2007-08-17 2007-08-17 Digital audio automatic gain control method and its system Expired - Fee Related CN101370056B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710094025 CN101370056B (en) 2007-08-17 2007-08-17 Digital audio automatic gain control method and its system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710094025 CN101370056B (en) 2007-08-17 2007-08-17 Digital audio automatic gain control method and its system

Publications (2)

Publication Number Publication Date
CN101370056A CN101370056A (en) 2009-02-18
CN101370056B true CN101370056B (en) 2012-12-05

Family

ID=40413666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710094025 Expired - Fee Related CN101370056B (en) 2007-08-17 2007-08-17 Digital audio automatic gain control method and its system

Country Status (1)

Country Link
CN (1) CN101370056B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742627B (en) * 2010-01-14 2012-08-29 京信通信***(中国)有限公司 Digital automatic gain control method of communication system and control system thereof
CN102195581A (en) * 2010-03-18 2011-09-21 承景科技股份有限公司 Method for adjusting volume of digital audio signal
CN101883164A (en) * 2010-06-29 2010-11-10 瑞声声学科技(深圳)有限公司 Adaptive volume gain device and method
CN103812811B (en) * 2012-11-07 2017-08-25 京信通信***(中国)有限公司 Data signal peak power automaton and method
CN105513606B (en) * 2015-11-27 2019-12-06 百度在线网络技术(北京)有限公司 Voice signal processing method, device and system
CN106877820B (en) * 2017-01-12 2020-08-11 广州市迪声音响有限公司 Equalization system and method for dynamically changing equalization gain
CN107507618A (en) * 2017-07-18 2017-12-22 北京小鱼在家科技有限公司 The voice digital signal auto gain control method of non-linear distortion can be prevented

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738196A (en) * 2004-08-17 2006-02-22 华为技术有限公司 Method and device for realizing automatic gain control
CN101018079A (en) * 2007-03-15 2007-08-15 北京中星微电子有限公司 Automatic gain control method, device and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738196A (en) * 2004-08-17 2006-02-22 华为技术有限公司 Method and device for realizing automatic gain control
CN101018079A (en) * 2007-03-15 2007-08-15 北京中星微电子有限公司 Automatic gain control method, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特表2007-509364A 2007.04.12

Also Published As

Publication number Publication date
CN101370056A (en) 2009-02-18

Similar Documents

Publication Publication Date Title
CN101370056B (en) Digital audio automatic gain control method and its system
US9536536B2 (en) Adaptive equalization system
US8724828B2 (en) Noise suppression device
KR101388540B1 (en) Method and device for clipping control
US8170879B2 (en) Periodic signal enhancement system
CN100573667C (en) The noise suppressor that is used for voice coding and speech recognition
US20050171785A1 (en) Audio decoding device, decoding method, and program
US20100266143A1 (en) Frequency-warped audio equalizer
CN102044243A (en) Method and device for voice activity detection (VAD) and encoder
CN108198571B (en) Bandwidth extension method and system based on self-adaptive bandwidth judgment
KR20120074303A (en) Audio signal switching method and device
CN102610235A (en) Sound mixing processing method, device and intelligent equipment
CN109859729B (en) Method and device for controlling waveform amplitude of audio
CN111768793A (en) LC3 audio encoder coding optimization method, system and storage medium
CN101359902B (en) Equalizing method and system for audio signal
US9614486B1 (en) Adaptive gain control
CN101567672A (en) Method and system for acquiring gain
CN114267382A (en) Limiter control method, device, equipment and medium for music sound effect processing
US8005669B2 (en) Method and system for reducing a voice signal noise
CN110858487A (en) Audio signal scaling processing method and device
CA2814434A1 (en) Adaptive equalization system
US20060089836A1 (en) System and method of signal pre-conditioning with adaptive spectral tilt compensation for audio equalization
JP3360423B2 (en) Voice enhancement device
CN111243631B (en) Automatic gain control method and electronic equipment
CN101383151A (en) Digital audio quality reinforcing system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: KUNSHAN JADE TECHNOLOGIES CO., LTD.

Free format text: FORMER OWNER: SHANGHAI JADE TECHNOLOGIES CO., LTD.

Effective date: 20100719

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 201203 BUILDING 16, NO.115, LANE 572, BIBO ROAD, ZHANGJIANG HI-TECH PARK, PUDONG NEW AREA, SHANGHAI CITY TO: 215311 TOWER ABCD, 12/F, SOUTH BUILDING, KUNSHANPUDONG SOFTWARE PARK, BACHENG TOWN, KUNSHAN CITY

TA01 Transfer of patent application right

Effective date of registration: 20100719

Address after: A ABCD 12 layer 215311 town Kunshan city Kunshan Pudong Software Park South

Applicant after: Shanghai Jade Technologies Co., Ltd.

Address before: 201203, No. 16, building 572, Lane 115, blue wave road, Zhangjiang hi tech park, Shanghai, Pudong New Area

Applicant before: Shanghai Jiede Microelectronic Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121205

Termination date: 20130817