TW200417167A - Communication system and method therefor - Google Patents

Communication system and method therefor Download PDF

Info

Publication number
TW200417167A
TW200417167A TW92116878A TW92116878A TW200417167A TW 200417167 A TW200417167 A TW 200417167A TW 92116878 A TW92116878 A TW 92116878A TW 92116878 A TW92116878 A TW 92116878A TW 200417167 A TW200417167 A TW 200417167A
Authority
TW
Taiwan
Prior art keywords
signal
filter
block
adaptive
adaptive filter
Prior art date
Application number
TW92116878A
Other languages
Chinese (zh)
Other versions
TWI319270B (en
Inventor
Lucio F C Pessoa
Roman A Dyba
Perry P He
Original Assignee
Motorola Inc
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
Priority claimed from US10/178,154 external-priority patent/US7215765B2/en
Priority claimed from US10/178,427 external-priority patent/US7242762B2/en
Priority claimed from US10/178,597 external-priority patent/US7016488B2/en
Priority claimed from US10/178,560 external-priority patent/US7388954B2/en
Priority claimed from US10/178,176 external-priority patent/US6961423B2/en
Application filed by Motorola Inc filed Critical Motorola Inc
Publication of TW200417167A publication Critical patent/TW200417167A/en
Application granted granted Critical
Publication of TWI319270B publication Critical patent/TWI319270B/en

Links

Abstract

A communication system (10) having an echo canceller (20) is disclosed. One embodiment of the echo canceller includes an adaptive filter (28) used to provide an estimate of reflected echo which is removed from the send signal. The echo canceller may also include a near-end talker signal detector (26) which may be used to prevent the adaptive filter from adapting when a near-end talker signal is present. The echo canceller may also include a nonlinear processor (32) used to further reduce any residual echo and to preserve background noise. The echo canceller may also include a monitor and control unit (30) which may be used to monitor the filter coefficients and gain of the adaptive filter to maintain stability of the echo canceller, estimate pure delay, detect a tone, and inject a training signal (41). The echo canceller may also include a nonadaptive filter (31) used to reduce the length of the adaptive filter.

Description

200417167 玖、發明說明: 【發明所屬之技術領域】 本發明通常係關於音頻指示’具體而言係用於通信系統 内音頻指示之方法及裝置。 【先前技術】 回音消除係用於電信網路(例如公眾交換電話網絡 (Public Switching Telephone Network; PSTN)或封包電話 (Packet Telephony ; PT)網路),藉由消除或減少電信網路的 電子或線性回音確保語音品質。此電子或線性回音可源於 併合電路(用以將來自四線通信網路介面之信號轉換至雙 線局部用戶迴路的裝置,反之亦然)之阻抗失配,通信網路 内顯著的長延遲可在電話語音通信之間製造明顯甚或無法 承受的干擾。因此,需要能夠將通信網路内回音完全消除 或減少至可接受位準的回音消除器。同樣,需要能夠偵測 藉由通信網路接收的音頻同時保持穩定性之回音消除器。 【發明内容】 此申請已在2002年6月24日提出申請之美國專利申請序 號 10/178,176、1〇/178,154、1〇/178,427、10/178,560 及 10/178,597中提出申請。 此係關於同時歸檔的律師檔案號碼SCI 2026TS之美國專 利申請,標題為「通信系統内適應性濾波器之監測及控 制」,同時歸檔的律師檔案號碼SC11977TS之美國專利申請 ’標題為「音頻信號非線性處理之方法及裝置」,同時歸檔 的律師檔案號碼SC12120TS之美國專利申請,標題為「通信 86017 200417167 系統内純延遲估計之方法及裝置」,以及同時歸檔的律師構 案號碼SC12107TS之美國專利申請,標題為「執行適應性滤 波之方法及裝置」,其全部讓渡給本發明之受讓人。 【實施方式】 本文使用的術語「匯流排」用以表示複數個信號或導體 ’其可用以傳送一個或多個各種類型的資訊,例如資料、 位元址、控制或狀態。本文討論的導體可參考單一導體、 複數個導體、單向導體或雙向導體解釋或說明。然而,不 同具體實施例可改變導體之實施。例如,可使用分離單向 導體,而非雙向導體,反之亦然。同樣’複數個導體可用 連續或以分時多工化方式傳送多個信號的單一導體取代。 同樣,載送多個信號的單一導體可分成載送這些信號之子 集的各種不同導體。因此,傳送信號可有許多選擇。 術語「判定」及「消除」(或「否定」)係用以表示分別處 於邏輯正確或邏輯錯誤狀態的信號、狀態位元元或類似裝 置。若邏輯正確狀態之邏輯位元準Α 、 -避弭U7L旱為—,則邏輯錯誤狀態 <邏輯位元準為零。若邏輯正確狀態之邏輯位元準為零, 9*1 ίΜ ill% A!5 則邏輯錯誤狀態之邏輯位元準為 °符號 厂* =運算操作,或其他類型:儲;= 徒供本發明文件中所用之延遲。 同樣,應注意本文說明之各組相 iA 仰剛圖式通常使用一致y •吏名%。儘管可複用相同的可變 圖式由从了 m® ?舟以表不不同組相關 弋中的不同裝置。例如,關於特 吾存I Τ疋、、,且圖式,Μ可表示測 里週期’而關於不同組圖式, 飞Μ可用作計數器值。不過以 皆 86017 -7- 200417167 下公式及圖式中會為使用的每個可變名稱提供說明。 連通性 圖1係通信系統10之一項具體實施例。通信系統1〇包括傳 送器/接收器12、介面13、併合電路16(亦稱為併合16)、回 紜消除器20、通彳§網路24、回音消除器22、介面15、併合 18及傳送器/接收器14。介面13包括併合16,介面15包括併 口 8。傳送器/接收器12雙向搞合至併合i6(其中在一項具體 實施例中,傳缉器/接收器12藉由雙線連結,例如雙絞線, 耦合至併合16)。併合16耦合至回音消除器2〇,藉由單向導 體提供傳送信號Sin 37至回音消除器20,並藉由單向導體從 回音消除益20接收一接收信號Rout 4〇(其中在一項具體實 施例中,每個Sin 37及Rout 40藉由雙線提供及接收)。回音 消除器20耦合至通信網路24,提供回音消除傳送信號s〇ut 42至通信網路24並從通信網路24接收Rin 43。 同樣,傳送器/接收器14雙向耦合至併合18(其中在一項具 體實施例中,傳送器/接收器14藉由雙線連結,例如雙絞線 ’耦合至併合18)。併合18耦合至回音消除器22,藉由單向 導體提供信號至回音消除器22,並藉由單向導體從回音消 除器22接收信號(其中在一項具體實施例中,每組單向導體 可為雙絞線)。回音消除器22耦合至通信網路24,提供回音 消除傳送信號至通信網路24並從通信網路24接收信號。控 制17可為一控制匯流排,包括一個或多個控制信號,其可 根據需要提供至每個傳送器/接收器12、併合16、回音消除 器20、通信網路24、回音消除器22、併合18及傳送器/接收 86017 200417167 器14。因此,在一項具體實施例中,控制i7槁合至通信系 統10内每-單元,而在替代具體實施例中,只有一部分單 元需要與控制17通信。 圖2係圖1之回音消除器2〇的一工員具體實施例。應注意在 參考圖2說明的具體實施例中,回音消除器2()稱為近端回音 消除器而回音消除器22稱為遠端回音消除器。然而,應明 白在回音消除器22處於通信系統1〇之近端而回音消除器 處於遠端的情形下,圖2說明的回音消除器亦可指回^除 器22。回音消除器20包括DC凹口波濾波器45、選擇性非適 應性濾波器3丨、加法器34、選擇性非適應性濾波器35、增 益控制33、非線性處理器32、近端信號偵測器%、適應^ 濾波器28、監測及控制單元3〇、DC凹口波濾波器49及加法 器36。DC凹口波濾波器45接收Sin 37並將Sin 38輸出至近端 信號偵測器26及監測及控制單元30。若有非適應性滤波器 31,則Sin 38亦提供至非適應性濾波器31,其係耦合用以接 收來自監測及控制單元30之控制並將sin 39輸出至加法器 3 4。然而’方操非適應性滤波器3 1 ’則S in 3 8與輸入加法哭 34之Sin 39相同。加法器34從適應性濾波器28接收Sin 39及 回音估計信號48,並提供錯誤信號46至增益控制33、近端 信號偵測器26及監測及控制單元30。增益控制33雙向搞合 至監測及控制單元30並耦合用以提供錯誤信號47至非線性 處理器32。若回音消除器20内有非適應性滤波器35,則在 一項具體實施例中增益控制33係在亦接收錯誤信號46之非 適應性濾波器35内,雙向耦合至監測及控制單元30並提供 86017 200417167 錯誤信號47 1線性處理器32雙—合至監測及控制單元 30並提供Sout 42。監測及控制單元3〇亦耦合至控制17,接 收Rin 43,提供串列信號41至加法㈣,從dc凹口波滤波 器49接收Rm 44 ’並雙向核合至適應性〉慮波器28及近端信號 偵測态26。DC凹口波濾波器49接收加法器%之輸出$〇加 40)並提供Rin 44至近端信號偵測器26、適應性濾波器“及 監測及控制單元30 〇加法器36接收串列信號41&Rin 43並提 供 Rout 40 〇 圖3係圖2之近端信號偵測器26的一項具體實施例。近端 仏號偵測器26包括近端信號位準估計器5〇、遠端信號位準 估计器52、Sin仏唬位準估計器54、背景處理器56、近端信 號偵測限值選擇器58及近端信號偵測器6〇。近端信號位準 估计器50接收錯誤信號46並耦合至近端信號偵測器6〇。遠 ^ k號位準估计器係搞合用以接收Rin 44,亦耦合至近端信 號偵測限值選擇益58。Sin信號位準估計器54係核合用以接 收Sin 38,亦耦合至近端信號偵測器6〇。背景處理器56耦合 至監測及控制單元30、近端信號偵測限值選擇器58及近端 信號偵測器60。近端信號偵測器60亦耦合至近端信號偵測 限值選擇器58及監測及控制單元30。 圖4係圖2之適應性濾波器28的一項具體實施例。適應性 滤波器28包括適應性滤波器62、選擇性非適應性滤波器64 及選擇性延遲66。假定非適應性濾波器64及延遲66皆出現 於適應性遽波器28内’延遲66接收Rin 44並耦合至非適應性 濾波器64及監測及控制單元30。非適應性濾波器64耦合至 86017 -10- 200417167 延遲66、適應性濾波器62及監測及控制單元3〇。適應性濾 波器62係耦合用以接收錯誤信號46並耦合用以提供回音估 計信號48,亦耦合至監測及控制單元30。若無非適應性濾 -波器64,則延遲66直接耦合至適應性濾波器62。若無延遲 66,則非適應性濾波器64接收Rin44。如延遲66及非適應性 滤波器64均無,則適應性濾波器62接收Rin44。 圖5係圖2之非線性處理器32的一項具體實施例。非線性 處理器32包括信號位準估計器、非線性處理器控制器74 、適應性背景位準估計器96,並雙向耦合至監測及控制單 元30。信號位準估計器68包括近端信號位準估計器7〇及遠 端信號位準估計器72。非線性處理器控制器74包括非線性 處理器啟動控制器76、非線性處理器關閉控制器78、適宜 雜訊產生器86、雜訊位準匹配器82及輸出信號混頻器84。 適應性旁景位準估計器96包括短期背景位準估計器88、背 景位準估計器控制器9〇、長期背景位準估計器92及背景位 準配接器94。近端信號位準估計器7〇接收錯誤信號47並耦 合至非線性處理器啟動控制器76及背景位準估計器控制器 90。运端t號位準估計器72接收Rin 44並耦合至非線性處理 器啟動控制器76、非線性處理器關閉控制器78及背景位準 估計器控制器90。非線性處理器啟動控制器%及非線性處 理器關閉控制器7_合至適宜雜訊產生器86,妹合至雜 訊位準匹配器82。輸出信號混頻器84耦合至雜訊位準匹配 w 82接收錯疾“號47並提供§〇加42。短期背景位準估計 器88耦合至背景位準配接器94並接收錯誤信號47。背景位 86017 11 - 200417167 準估計器控制器_合至短期背景位準料㈣及長期背 景位準估計器92。長㈣景料估計㈣接收錯誤信號47 並耦合至背景位準配接器94,其耦合至雜訊位準匹配器 82 〇 圖6係監測及控制單元30之一部分的一項具體實施例,其 包括一增益監視器100及一濾波器係數監視器1〇2。增益監 視器1〇〇接收Sin 38、錯誤信號46,並耦合至適應性濾波器 28及增应控制33。濾波器係數監視器1〇2耦合至適應性濾波 器28 〇 圖7係監測及控制單元30之另一部分的一項具體實施例, 其包括十進制滤波器104及108、十選一取樣器1〇6及11〇、 近端信號偵測器114、選擇性比較器112、回音返回損失増 強(Echo Return Loss Enhancement ; ERLE)估計器 116、功率 估計器120及118、適應性濾波器系統128及雜訊產生器132 。適應性濾波器系統128包括適應性濾波器122、最大值定 位咨124及延遲確定126。十進制滤波器1〇4接收Rin 44並輕 合至十選一取樣器106。十進制濾波器ι〇8接收Sin 38並镇合 至十選一取樣器110。十選一取樣器106耦合至近端信號價 測器114、功率估計器120及適應性濾波器122。功率估計器 120及近端信號偵測器114耦合至適應性濾波器系統128。選 擇性比較器112若出現於監測及控制單元30,則接收錯誤信 號46及Sin 38,並耦合至適應性濾波器系統128。十選一取 樣器110耦合至功率估計器U8及適應性濾波器122。功率估 計器118耦合至ERLE估計器116及適應性濾波器系統ι28,而 86017 -12 - 200417167 適應性濾波器122耦合至近端信號偵測器114、ERLE估計器 116及最大值定位器124。最大值定位器124耦合至延遲確定 126,其提供估計延遲130至適應性濾波器28。雜訊產生器 132接收Rin 43並耦合以提供注入信號41至加法器36。圖7 之監測及控制單元30的部分亦槁合至控制17。 圖8係監測及控制單元3〇另一部分的一項具體實施例,其 包括儲存器150、功率估計器134、平滑相關器152及音頻指 示決定單元166。功率估計器134包括延遲136、延遲138、 乘法器140及142、加法器144、數值146及低通濾波器148。 平滑相關器152包括延遲154、乘法器156及158、低通濾波 器160及162及振盪器164。儲存器150耦合至延遲136、延遲 138、低通濾波器148、延遲154、低通濾波器160及162及振 盪器164。延遲136接收Rin 44或Sin 38並耦合至延遲138及乘 法器142。延遲138耦合至乘法器140,其亦接收Rin 44或Sin 38。加法器144耦合至乘法器14〇及142及數值146,其耦合 至低通濾波器148(其音頻指示決定單元166)。延遲ι54接收 Rin 44或Sin 38並耦合至乘法器156。乘法器158亦接收Rin 44或Sin 38並耦合至低通濾波器16〇、振盪器164及乘法器 156。乘法器156接收延遲154並耦合至低通濾波器162及振 盪器164。音頻指示決定單元166從低通濾波器16〇接收R〇(n) ,從低通濾波器162接收RJn),並提供音頻指示器信號168 至適應性濾波器28。 應注意圖1至8係通信系統1〇及回音消除器2〇内方塊的一 項具體實施例。替代具體實施例根據需要的功能性可包括 86017 -13 - 200417167 各種不同於說明的元件、多於說明的元件或少於說明的元 件。此外,圖1至8内方塊可分成不同組或不同連接而仍然 實現相同結果。因此圖丨至8僅解釋為提供用以說明以下論 述概念之範例。同樣,儘管圖丨至8内連結在圖式中係單一 導體(單向或雙向)或多個導體(單向或雙向),各種不同連結 皆可使用。例如,多個導體可用各種不同單一單向或雙向 導體取代。同樣,單一導體可擴充至多個單向或雙向導體 。仏號可藉由單一導體連續通信或藉由多個導體平行通信 。同樣,信號可藉由單一或多個導體分時多工化。因此, 圖1至8内說明之連結可以各種不同方式實施而仍然實現需 要的功能性。同樣,如以下將要進一步說明,圖丨至8的設 計可實施成硬體、軟體或硬體及軟體之組合。 操作: 傳送器/接收器1 2提供資料信號至併合丨6並從其接收資 料仏號。併合16提供傳送器/接收器與通信網路24之間的 四線至雙線轉換。因此,傳送器/接收器12可為任何用以在 通信網路24上通信之裝置,例如電話或數據機,其藉由雙 線用戶線耦合至併合16。因此,併合16提供局部用戶迴路 (具有傳送器/接收器12)及通信網路(通信網路24)之間的介 面。傳送器/接收器14及併合18功能分別類似傳送器/接收器 12及併合16。 傳送器/接收器12及傳送器/接收器14之間的通信中,電子 或線性回音可藉由併合16及併合18引入通信。此回音之來 源係併合16内阻抗失配以及併合18内阻抗失配。例如,若 86017 -14 - 200417167 併合16内阻抗完全匹配,來自接受信號R〇m 4〇的全部能量 會傳送至傳送器/接收器12。然而,若併合16时任何阻抗 失配,來自接受信號Rout 40的部分能量會藉由傳送信號 37反射回。若通信網路24雙程延遲(來自傳送器/接收器i4 ,在由併合16引入回音之情形下)足夠長,則藉由傳送器/ 接收器14接收之來自Sin 37的反射回音在通信過程中很顯 著。此可導致電話語音通信中的顯著回音甚或無法承受的 干擾。一項具體實施例中,足夠長的延遲指大於4〇毫秒之 雙程延遲。隨雙程延遲增加,回音會更糟並從而更顯著及 具破壞性。(另一方面,若雙程延遲足夠小,由於無法從側 音區分出回音,其可不具破壞性。)雙程延遲可包括各種不 同延遲或其組合,包括傳送延遲、處理延遲、計算延遲等 等。根據通信系統,雙程延遲可足夠大至中斷通信。因此 回音消除器20及22可用以減少通信系統1〇内的線性回音。 例如,從藉由Rout 40接收(自傳送器/接收器丨4)並藉由Sin 37 反射回的信號藉由併合16引入的回音藉由回音消除器2〇處 理,在將信號Sout 42藉由通信網路24傳送回至傳送器/接收 器14之前減少反射回音。 如上所述,線性回音藉由阻抗失配引入併合丨6,並藉由 阻抗失配引入併合18。同樣,聲學回音可藉由傳送器/接收 器12及傳送器/接收器14引入通信。例如,若傳送器/接收器 12係擴音電話,接收信號藉由揚聲器輸出後會在周圍環境 彈跳,一些信號可重引導回至傳送器/接收器12之麥克風且 亦反射回至傳送器/接收器14。一項具體實施例中,回音消 86017 -15- 200417167 除器20之功能亦可減少除線性回音之外的聲學回音一些方 面0 一項具體實施例中,通信網路24可包括一封包電話網絡 (包括例如網際網路協定(internet protocol ; IP)語音、封包資 料、非同步傳送模式(asynchronous transfer mode ; ATM)等 等,可應用於無線或線路系統)或公共交換電話網絡(Public Switching Telephone Network ; PSTN)。替代具體實施例中 ,通信系統10可指任何類型的通信系統。任何通信路徑皆 可用作介面13或介面15。 控制17提供傳送器/接收器12及14、併合16及17、回音消 除器20及22及通信系統24中的控制路徑。藉由控制17傳送 之控制信號通常非線路内信號。例如,控制17可包括用以 啟動或關閉回音消除器20或22之啟動/關閉信號。控制17可 包括用以指示電話係處於挂電話狀態或拿起狀態的信號。 在本文說明的具體實施例中,傳送器/接收器12稱為關於 回音消除器20之近端,而傳送器/接收器14稱為關於回音消 除器20之遠端。因此,本文的具體實施例將參考回音消除 器20予以說明,不過,應明白回音消除器22之操作類似於 回音消除器20。即在替代具體實施例中,傳送器/接收器14 稱為關於回音消除器22之近端,而傳送器/接收器12稱為關 於回音消除器22之遠端。 圖2係回音消除器20之一項具體實施例,其中如上所述, 傳送器/接收器12係近端而傳送器/接收器14係遠端。Sin 37 係從傳送器12藉由併合16傳送的傳送信號。回音消除器20 86017 -16- 200417167 藉由通信網路24及併合18提供回音消除之傳送信號Sout 42 至接收器14。Rin 43係藉由併合1 8及通信網路24從傳送器14 接收之接收信號。回音消除器接收Rin 43並藉由併合16將此 傳送信號Rin 43同Rout 40—樣提供至接收器12。 如上所述,Sin 37可包括藉由阻抗失配引入併合16之反射 回音。因此,回音消除器20減少(或消除)引入之反射回音並 提供回音消除的傳送信號Sout 42。即,若併合16内之阻抗 完全匹配,由於無反射回音(理想及實際無法做到之情形) ,在併合16之輸入接收的信號(例如R0Ut 40)實質上不會對 併合16(Sin 37)作出反應。然而,若併合處於不平衡狀態 (通常情形係例如阻抗失配),藉由Rout 40接收之信號導致 圖37所示之反應。圖37說明從輸入(R0ut 40)及輸出(Sin 37) 觀點所見的併合電路之對應脈衝回應(h)。回音消除器2〇内 適應性濾波器28嘗試「類比」Sin 37之併合反應(至任何輸 入信號Rout 40)並藉由加法器34將其減去。應注意信號R〇ut 40係線性失真(包括及時純換位,即藉由稱為純延遲之參數 及時移位)。此失真可用圖37併合16之脈衝回應說明。應注 意脈衝回應包括純延遲部分及分散時間。純延遲指脈衝回 應中從開始至一些顯著值開始出現的部分,如圖37之T1所 表π。分散時間指脈衝回應持續時間中從顯著反應開始發 生至反應實質上消失的部分,如圖37之丁4+丁2所表示。脈衝 回應 < 形狀(根據對應分散時間區段之部分)可轉化為併合 之頻率特徵(如從R0ut 4〇/Sin 3 7輸入/輸出埠所看出)。200417167 (1) Description of the invention: [Technical field to which the invention belongs] The present invention generally relates to audio indicators', and more particularly to methods and devices for audio indicators in a communication system. [Prior art] Echo cancellation is used in telecommunication networks (such as the Public Switching Telephone Network (PSTN) or Packet Telephony (PT) networks), by eliminating or reducing the electronic or Linear echo ensures speech quality. This electronic or linear echo can originate from the impedance mismatch of the merging circuit (a device used to convert signals from the four-wire communication network interface to a two-wire local user loop, and vice versa), and noticeably long delays in the communication network Disturbances that can be noticeable or even unacceptable can occur between telephone voice communications. Therefore, there is a need for an echo canceller capable of completely eliminating or reducing echo in a communication network to an acceptable level. Similarly, there is a need for an echo canceller capable of detecting audio received through a communication network while maintaining stability. [Summary of the Invention] This application has been filed in U.S. Patent Application Serial Nos. 10 / 178,176, 10 / 178,154, 10 / 178,427, 10 / 178,560, and 10 / 178,597, filed on June 24, 2002. This is a US patent application filed with lawyer file number SCI 2026TS, titled "Monitoring and Control of Adaptive Filters in Communication Systems", and a filed US patent application filed with lawyer file number SC11977TS is titled "Audio Signal Non Method and Apparatus for Linear Processing ", US patent application filed with lawyer file number SC12120TS at the same time, entitled" Communication 86017 200417167 Method and Device for Pure Delay Estimation in the System ", and US Patent Application Filed with Lawyer Case Number SC12107TS at the same time , Titled "Method and Apparatus for Performing Adaptive Filtering", which are all transferred to the assignee of the present invention. [Embodiment] As used herein, the term "bus" is used to indicate a plurality of signals or conductors' which can be used to transmit one or more various types of information, such as data, bit addresses, controls, or states. The conductors discussed herein can be explained or explained with reference to a single conductor, a plurality of conductors, a unidirectional conductor, or a bidirectional conductor. However, different embodiments may vary the implementation of the conductor. For example, separate unidirectional conductors can be used instead of bidirectional conductors and vice versa. Similarly, a plurality of conductors may be replaced with a single conductor that transmits multiple signals continuously or in a time division multiplexed manner. Similarly, a single conductor carrying multiple signals can be divided into a variety of different conductors carrying a subset of these signals. Therefore, there are many options for transmitting signals. The terms "determination" and "elimination" (or "negation") are used to indicate signals, status bits, or similar devices that are in a logically correct or logically incorrect state, respectively. If the logical bit level A and -avoid U7L of the logically correct state are-, the logical error state < logical bit level is zero. If the logical bit of the logically correct state is zero, 9 * 1 ίΜill% A! 5, the logical bit of the logically incorrect state is ° sign factory * = operation operation, or other types: storage; = only for the present invention Delay used in the document. Also, it should be noted that the iA and Yanggang schemes of the phases described in this paper usually use the same y. Although the same variable schema can be reused by the m®? Boat to represent different devices in different groups of related units. For example, with regard to the special I 疋, T, and, and the pattern, M can represent the measurement cycle ', and with respect to different sets of patterns, Fe M can be used as a counter value. However, for each variable name used, descriptions are provided in the formulas and drawings below 86017 -7- 200417167. Connectivity FIG. 1 illustrates a specific embodiment of a communication system 10. The communication system 10 includes a transmitter / receiver 12, an interface 13, a merging circuit 16 (also referred to as a merging 16), an echo canceller 20, a communication network 24, an echo canceller 22, an interface 15, an merge 18, and Transmitter / receiver 14. The interface 13 includes a merge 16 and the interface 15 includes a parallel port 8. The transmitter / receiver 12 is bidirectionally coupled to the merging i6 (wherein in a specific embodiment, the transponder / receiver 12 is coupled to the merging 16 by a two-wire connection, such as a twisted pair). The coupling 16 is coupled to the echo canceller 20, and the transmission signal Sin 37 is provided to the echo canceller 20 through a unidirectional body, and the reception signal Rout 4 is received from the echo cancellation benefit 20 through a unidirectional body. In the embodiment, each of Sin 37 and Rout 40 is provided and received through two lines). The echo canceller 20 is coupled to the communication network 24 and provides an echo cancellation transmission signal sout 42 to the communication network 24 and receives a Rin 43 from the communication network 24. Similarly, the transmitter / receiver 14 is bidirectionally coupled to the merging 18 (wherein in a specific embodiment, the transmitter / receiver 14 is coupled to the merging 18 by a two-wire connection, such as a twisted pair '). The union 18 is coupled to the echo canceller 22, and provides a signal to the echo canceller 22 through a unidirectional conductor, and receives a signal from the echo canceller 22 through a unidirectional conductor (in a specific embodiment, each group of unidirectional conductors May be twisted pair). The echo canceller 22 is coupled to the communication network 24 and provides echo cancellation to transmit signals to and receive signals from the communication network 24. The control 17 may be a control bus including one or more control signals, which may be provided to each transmitter / receiver 12, merge 16, echo canceller 20, communication network 24, echo canceller 22, Union 18 and transmitter / receiver 86017 200417167 device 14. Therefore, in a specific embodiment, the control i7 is coupled to each unit in the communication system 10, while in an alternative embodiment, only a part of the units needs to communicate with the control 17. FIG. 2 is a specific embodiment of a worker of the echo canceller 20 of FIG. 1. It should be noted that in the specific embodiment described with reference to Fig. 2, the echo canceller 2 () is called a near-end echo canceller and the echo canceller 22 is called a far-end echo canceller. However, it should be understood that in the case where the echo canceller 22 is at the near end of the communication system 10 and the echo canceller is at the far end, the echo canceller illustrated in FIG. 2 may also be referred to as the echo canceller 22. The echo canceller 20 includes a DC notch filter 45, a selective non-adaptive filter 3, an adder 34, a selective non-adaptive filter 35, a gain control 33, a non-linear processor 32, and a near-end signal detection. Tester%, adaptive filter 28, monitoring and control unit 30, DC notch wave filter 49 and adder 36. The DC notch wave filter 45 receives Sin 37 and outputs Sin 38 to the near-end signal detector 26 and the monitoring and control unit 30. If there is a non-adaptive filter 31, Sin 38 is also provided to the non-adaptive filter 31, which is coupled to receive control from the monitoring and control unit 30 and output sin 39 to the adder 34. However, 'Square non-adaptive filter 3 1', then S in 3 8 is the same as Sin 39 of input addition cry 34. The adder 34 receives the Sin 39 and the echo estimation signal 48 from the adaptive filter 28, and provides an error signal 46 to the gain control 33, the near-end signal detector 26, and the monitoring and control unit 30. The gain control 33 is bidirectionally coupled to the monitoring and control unit 30 and is coupled to provide an error signal 47 to the non-linear processor 32. If there is a non-adaptive filter 35 in the echo canceller 20, in a specific embodiment, the gain control 33 is in the non-adaptive filter 35 that also receives the error signal 46, and is bidirectionally coupled to the monitoring and control unit 30 and Provide 86017 200417167 error signal 47 1 linear processor 32 dual-to-monitor and control unit 30 and provide Sout 42. The monitoring and control unit 30 is also coupled to the control 17, receives Rin 43, provides a serial signal 41 to the addition ㈣, receives Rm 44 'from the dc notch wave filter 49 and combines it bidirectionally to the adaptability> wave filter 28 and Near-end signal detection state 26. The DC notch wave filter 49 receives the output of the adder% ($ 0 plus 40) and provides Rin 44 to the near-end signal detector 26, the adaptive filter "and the monitoring and control unit 30. The adder 36 receives the serial signal 41 & Rin 43 and provide Rout 40. Figure 3 is a specific embodiment of the near-end signal detector 26 of Figure 2. The near-end signal detector 26 includes a near-end signal level estimator 50, and a far end. Signal level estimator 52, Sin bluff level estimator 54, background processor 56, near-end signal detection limit selector 58 and near-end signal detector 60. Near-end signal level estimator 50 receives The error signal 46 is also coupled to the near-end signal detector 60. The far ^ k level estimator is adapted to receive Rin 44 and is also coupled to the near-end signal detection limit selection benefit 58. Sin signal level estimation The device 54 is integrated to receive Sin 38 and is also coupled to the near-end signal detector 60. The background processor 56 is coupled to the monitoring and control unit 30, the near-end signal detection limit selector 58 and the near-end signal detection器 60。 Near-end signal detector 60 is also coupled to the near-end signal detection limit selector 58 and monitoring and control Element 30. Fig. 4 is a specific embodiment of the adaptive filter 28 of Fig. 2. The adaptive filter 28 includes an adaptive filter 62, a selective non-adaptive filter 64, and a selective delay 66. Assume non-adaptive The adaptive filter 64 and the delay 66 both appear in the adaptive wave filter 28. The delay 66 receives Rin 44 and is coupled to the non-adaptive filter 64 and the monitoring and control unit 30. The non-adaptive filter 64 is coupled to 86017 -10 -200417167 Delay 66, adaptive filter 62 and monitoring and control unit 30. Adaptive filter 62 is coupled to receive error signal 46 and coupled to provide echo estimation signal 48, and is also coupled to monitoring and control unit 30. If there is no non-adaptive filter-wave 64, the delay 66 is directly coupled to the adaptive filter 62. If there is no delay 66, the non-adaptive filter 64 receives Rin44. If neither the delay 66 nor the non-adaptive filter 64, The adaptive filter 62 receives Rin44. Fig. 5 is a specific embodiment of the non-linear processor 32 of Fig. 2. The non-linear processor 32 includes a signal level estimator, a non-linear processor controller 74, and an adaptive background. Level estimator 96 It is bidirectionally coupled to the monitoring and control unit 30. The signal level estimator 68 includes a near-end signal level estimator 70 and a far-end signal level estimator 72. The non-linear processor controller 74 includes a non-linear processor activation control Generator 76, non-linear processor shutdown controller 78, suitable noise generator 86, noise level matcher 82, and output signal mixer 84. The adaptive horizon level estimator 96 includes a short-term background level estimator 88. Background level estimator controller 90, long-term background level estimator 92, and background level adapter 94. The near-end signal level estimator 70 receives the error signal 47 and is coupled to the non-linear processor activation controller 76 and the background level estimator controller 90. The T-level estimator 72 at the transport end receives Rin 44 and is coupled to the non-linear processor enable controller 76, the non-linear processor shutdown controller 78, and the background level estimator controller 90. The non-linear processor starts the controller% and the non-linear processor turns off the controller 7_ to the appropriate noise generator 86, and to the noise level matcher 82. The output signal mixer 84 is coupled to the noise level matching w 82 to receive the error number 47 and provides §0 plus 42. The short-term background level estimator 88 is coupled to the background level adapter 94 and receives the error signal 47. Background level 86017 11-200417167 Quasi-estimator controller_ Combined with short-term background level and long-term background level estimator 92. Long-term background level estimation receives error signal 47 and is coupled to background level adapter 94, It is coupled to the noise level matcher 82. FIG. 6 is a specific embodiment of a part of the monitoring and control unit 30, which includes a gain monitor 100 and a filter coefficient monitor 102. The gain monitor 1 〇〇 Receives Sin 38, error signal 46, and is coupled to adaptive filter 28 and add-on control 33. Filter coefficient monitor 102 is coupled to adaptive filter 28. Figure 7 is another part of monitoring and control unit 30 A part of a specific embodiment includes a decimal filter 104 and 108, a ten-to-one sampler 106 and 110, a near-end signal detector 114, a selective comparator 112, and a strong echo return loss (Echo Return Loss Enhancement; ERLE) Device 116, power estimators 120 and 118, adaptive filter system 128, and noise generator 132. Adaptive filter system 128 includes adaptive filter 122, maximum positioning reference 124, and delay determination 126. Decimal filter 1 〇4 receives Rin 44 and closes it to ten out of one sampler 106. Decimal filter ι08 receives Sin 38 and unbinds it to ten out of one sampler 110. Ten out of one sampler 106 is coupled to the near-end signal price detector 114. Power estimator 120 and adaptive filter 122. Power estimator 120 and near-end signal detector 114 are coupled to adaptive filter system 128. Selective comparator 112, if present in monitoring and control unit 30, receives The error signal 46 and Sin 38 are coupled to the adaptive filter system 128. One of the ten samplers 110 is coupled to the power estimator U8 and the adaptive filter 122. The power estimator 118 is coupled to the ERLE estimator 116 and the adaptive filter 2817 and 86017 -12-200417167 adaptive filter 122 is coupled to the near-end signal detector 114, the ERLE estimator 116 and the maximum positioner 124. The maximum positioner 124 is coupled to the delay determination 126, which provides The estimated delay is 130 to the adaptive filter 28. The noise generator 132 receives Rin 43 and is coupled to provide the injected signal 41 to the adder 36. The portion of the monitoring and control unit 30 of Fig. 7 is also combined to control 17. Fig. 8 series A specific embodiment of another part of the monitoring and control unit 30 includes a storage 150, a power estimator 134, a smoothing correlator 152, and an audio instruction determination unit 166. The power estimator 134 includes a delay 136, a delay 138, multipliers 140 and 142, an adder 144, a value 146, and a low-pass filter 148. The smoothing correlator 152 includes a delay 154, multipliers 156 and 158, low-pass filters 160 and 162, and an oscillator 164. The memory 150 is coupled to a delay 136, a delay 138, a low-pass filter 148, a delay 154, low-pass filters 160 and 162, and an oscillator 164. Delay 136 receives Rin 44 or Sin 38 and is coupled to delay 138 and multiplier 142. Delay 138 is coupled to multiplier 140, which also receives Rin 44 or Sin 38. The adder 144 is coupled to multipliers 14 and 142 and a value 146, which is coupled to a low-pass filter 148 (its audio instruction determining unit 166). Delay 54 receives Rin 44 or Sin 38 and is coupled to multiplier 156. Multiplier 158 also receives Rin 44 or Sin 38 and is coupled to low-pass filter 160, oscillator 164, and multiplier 156. The multiplier 156 receives the delay 154 and is coupled to the low-pass filter 162 and the oscillator 164. The audio instruction determination unit 166 receives Ro (n) from the low-pass filter 160 and RJn from the low-pass filter 162), and provides an audio indicator signal 168 to the adaptive filter 28. It should be noted that a concrete embodiment of the blocks in the communication system 10 and the echo canceller 20 of Figs. 1 to 8 is shown. The alternative specific embodiment may include 86017 -13-200417167 as various functionalities, other than the described elements, more than the described elements, or less than the specified elements, as required. In addition, the blocks in Figures 1 to 8 can be divided into different groups or different connections while still achieving the same result. Figures 8 through 8 are therefore only interpreted to provide examples to illustrate the concepts discussed below. Similarly, although the connections in Figures 8 through 8 are single conductors (unidirectional or bidirectional) or multiple conductors (unidirectional or bidirectional) in the drawing, various connections can be used. For example, multiple conductors can be replaced with a variety of different single unidirectional or bidirectional conductors. Similarly, a single conductor can be extended to multiple unidirectional or bidirectional conductors. The 仏 can communicate continuously through a single conductor or in parallel through multiple conductors. Similarly, signals can be time-multiplexed by a single or multiple conductors. Thus, the connections illustrated in Figures 1 to 8 can be implemented in a variety of different ways while still achieving the required functionality. Also, as will be explained further below, the designs of Figures 1 through 8 can be implemented as hardware, software, or a combination of hardware and software. Operation: The transmitter / receiver 12 provides the data signal to the merger 6 and receives the data number from it. Union 16 provides four-wire to two-wire conversion between transmitter / receiver and communication network 24. Therefore, the transmitter / receiver 12 may be any device used to communicate on the communication network 24, such as a telephone or modem, which is coupled to the union 16 via a two-line subscriber line. Therefore, merging 16 provides an interface between a local user loop (with transmitter / receiver 12) and a communication network (communication network 24). Transmitter / receiver 14 and merge 18 function similarly to transmitter / receiver 12 and merge 16 respectively. In the communication between the transmitter / receiver 12 and the transmitter / receiver 14, electronic or linear echoes can be introduced into the communication through union 16 and union 18. The source of this echo is the impedance mismatch in the 16 combined and the impedance mismatch in the 18 combined. For example, if the 86017 -14-200417167 combination 16 impedance is perfectly matched, the entire energy from the received signal Rom 4o will be transmitted to the transmitter / receiver 12. However, if any impedance mismatch occurs at 16 when combined, part of the energy from the received signal Rout 40 will be reflected back by the transmitted signal 37. If the communication network 24 two-way delay (from the transmitter / receiver i4, in the case where the echo is introduced by merge 16) is long enough, the reflected echo from Sin 37 received by the transmitter / receiver 14 is in the communication process Is very significant. This can cause significant echo or even unbearable interference in telephone voice communications. In a specific embodiment, a sufficiently long delay refers to a two-way delay greater than 40 milliseconds. As the round trip delay increases, the echo becomes worse and thus more significant and disruptive. (On the other hand, if the two-way delay is small enough, since the echo cannot be distinguished from the sidetone, it may not be destructive.) The two-way delay may include various delays or a combination thereof, including transmission delay, processing delay, calculation delay, etc. Wait. Depending on the communication system, the two-way delay can be large enough to interrupt communication. Therefore, the echo cancellers 20 and 22 can be used to reduce the linear echo in the communication system 10. For example, from the signal received by Rout 40 (from the transmitter / receiver 4) and reflected back by Sin 37, the echo introduced by merge 16 is processed by echo canceler 20, and the signal Sout 42 is processed by The communication network 24 reduces reflected echoes before transmitting back to the transmitter / receiver 14. As mentioned above, the linear echo is introduced by the impedance mismatch 6 and the merge is introduced by the impedance mismatch 18. Similarly, acoustic echoes can be introduced into the communication via the transmitter / receiver 12 and the transmitter / receiver 14. For example, if the transmitter / receiver 12 is an amplified telephone, the received signal will bounce in the surrounding environment after being output by the speaker. Some signals can be redirected back to the microphone of the transmitter / receiver 12 and also reflected back to the transmitter / receiver. Receiver 14. In a specific embodiment, the function of echo cancellation 86017 -15- 200417167 can reduce acoustic echo in addition to linear echo in some aspects. In a specific embodiment, the communication network 24 may include a packet telephone network (Including, for example, internet protocol (IP) voice, packet data, asynchronous transfer mode (ATM), etc., can be applied to wireless or line systems) or public switched telephone network (Public Switching Telephone Network ; PSTN). In an alternative embodiment, the communication system 10 may refer to any type of communication system. Any communication path can be used as the interface 13 or the interface 15. Control 17 provides control paths in transmitters / receivers 12 and 14, merging 16 and 17, echo cancellers 20 and 22, and communication system 24. The control signal transmitted by the control 17 is usually an off-line signal. For example, the control 17 may include an on / off signal to activate or deactivate the echo canceller 20 or 22. The control 17 may include a signal to indicate that the telephone system is in a hung state or a picked up state. In the specific embodiment described herein, the transmitter / receiver 12 is referred to as the near end of the echo canceller 20, and the transmitter / receiver 14 is referred to as the far end of the echo canceller 20. Therefore, the specific embodiment herein will be described with reference to the echo canceller 20, but it should be understood that the operation of the echo canceller 22 is similar to that of the echo canceller 20. That is, in an alternative embodiment, the transmitter / receiver 14 is referred to as the near end of the echo canceller 22, and the transmitter / receiver 12 is referred to as the far end of the echo canceller 22. FIG. 2 is a specific embodiment of the echo canceller 20, wherein, as described above, the transmitter / receiver 12 is the near end and the transmitter / receiver 14 is the far end. Sin 37 is a transmission signal transmitted from transmitter 12 through merging 16. The echo canceller 20 86017 -16- 200417167 provides the echo canceled transmission signal Sout 42 to the receiver 14 through the communication network 24 and the merger 18. Rin 43 is a reception signal received from transmitter 14 through merging 18 and communication network 24. The echo canceller receives Rin 43 and supplies this transmission signal Rin 43 to receiver 12 in the same way as Rout 40 by merging 16. As mentioned above, Sin 37 may include a reflection echo of merge 16 introduced by impedance mismatch. Therefore, the echo canceller 20 reduces (or eliminates) the reflected echoes introduced and provides an echo canceled transmission signal Sout 42. That is, if the impedance in Merge 16 is perfectly matched, due to no reflection echo (ideally and practically impossible), the signal received at the input of Merge 16 (such as R0Ut 40) will not substantially affect Merge 16 (Sin 37) react. However, if the merger is in an unbalanced state (usually, for example, an impedance mismatch), the signal received by Rout 40 results in the response shown in Figure 37. Figure 37 illustrates the corresponding impulse response (h) of the merging circuit seen from the viewpoint of the input (Rout 40) and the output (Sin 37). The adaptive filter 28 within the echo canceller 20 tries the "analog" Sin 37 (to any input signal Rout 40) and subtracts it by an adder 34. It should be noted that the signal Rout 40 is linearly distorted (including timely pure transposition, that is, shifted in time by a parameter called pure delay). This distortion can be explained by the impulse response of Fig. 37 and 16. It should be noted that the impulse response includes a pure delay portion and a dispersion time. Pure delay refers to the part of the pulse response that appears from the beginning to some significant value, as shown by T1 in Figure 37. Dispersion time refers to the part of the duration of the impulse response from the beginning of the significant response to the substantial disappearance of the response, as shown by Ding 4 + Ding 2 in Figure 37. The impulse response < shape (according to the portion of the corresponding dispersion time zone) can be converted to a merged frequency characteristic (as seen from the Rout 4 / Sin 3 7 input / output ports).

Sm 37提供至DC凹口波滤波器45,g便從Sin 37移除DC 86017 -17- 200417167 組件。應注意在一替代具體實施例中,高通滤波器可用於 DC凹口波濾波器45之位置。同樣,加法器36之輸出(R〇ut4〇) 提供至DC凹口波滤波器49 ’以便從R0Ut 40移除DC組件(然 而,替代具體實施例中可使用高通濾波器)。使用DC凹口波 /慮波器在運昇上可廉於兩通滤波器,亦不會導致漣游效應 5其有助於藉由滤波器之通帶保持增益平度。一替代具體 實施例中,單一共用DC凹口波濾波器可用以執行DC凹口波 濾波器45及DC凹口波濾波器49之功能。 應注意加法器36接收Rin 43及串列信號41並提供兩個信 號之總和Rout 40,然而,若串列信號41為零,輸出R〇ut 4〇 即與輸入Rin 43相同。對於以下緊跟的說明,會假定串列信 號41為零且Rout 40等於Rin 43。同樣,應注意非適應性滤 波器3 1及非適應性滤波器3 5係選擇性,以下將進一步說明 。對於以下緊跟的說明,會假定Sin 38及Sill 39相等,且錯 誤信號47係錯誤信號46之增益調整版本,而無非適應性滤 波器35之效應。 因此,Sin 39係傳送信號,其包括藉由傳送器12傳送的任 何近通活器化號(Sgen)及藉由併合16從R〇ut 40引入的任 何反射回音。因此’ Sin 39可表示為「Sgen+回音」。適應性 滤波器28提供反射回音之估計,即回音估計信號48至加法 器34’其輸出錯誤信號46。因此,錯誤信號46可表示為 「Sin 39-估計回音48」或以上述運算式取代sin 39,即 「Sgen+回音一估計回音48」。當估計回音係精確(即等於或 貫質上等於實際回音)時,則錯誤信號仏將只包括無任何實 86017 -18 - 200417167 質回音之Sgen。此係理想情形。然而,若估計回立 曰个精確 ,錯誤信號46將包括Sgen及殘餘回音組件。此情形中,錯 誤信號46可表示為「Sgen+殘餘回音」,其中殘餘回音^ 「回音-估計回音」。當無Sgen時(即當近端靜寂,意味著未 傳送來自傳送器12之信號),錯誤信號46僅代表殘餘回音。 此情形中,錯誤信號46可用以執行適應性方法,以將殘餘 回音減至最小,以下會進一步詳細說明。然而,若有 ,錯誤信號46不能用於執行適應性方法,因為適應性濾波 器28使用錯誤來調適,錯誤信號46無法在Sgen存在情形下 調整錯誤。因此需要偵測Sgen以決定適應性方法能否執行 。耦合以接收Sin 38(此範例中其等於sin 39)及Rin 44之近端 信號偵測器26使用來自監測及控制單元3〇的錯誤信號仏及 控制信號偵測Sgen之存在(即偵測傳送器12上近端通話器 之存在)。 在適應性濾波器單元28中,回音估計信號48,y(k),藉由 y(k)= XT(k)· H(k)計算,其中 X(k)= [x(k),x(k _1),···,x(k _ N + 1)广係延伸至FIR濾波器範圍持續時間之輸入信號向量; x(n)=Riri44。H(k)係用於第k個疊代之濾波器係數向量,其 中H(k)= [h〇(k),hKk),···,!^-#)]1。濾波器係數實際更新由一 般LMS型演算法控制。H(k+l)=H(k)+ step—size 4ιτογ(1<:)·Χ(]<:) ’其中error(k)對應錯誤信號46 ; stepjize控制適應率;而 H(k+1)為新濾波器係數向量。 錯誤信號46内任何殘餘回音可由非線性處理器32進一步 減少或移除。非線性處理器32從監測及控制單元30接收錯 86017 -19- 200417167 誤信號47(此具體實施例中係錯誤信號46之增益調整版本) 及控制信號以產生Sout 42,其理想狀況中係不包括回音。 除減少或移除殘餘回音外,非線性處理器32亦嘗試保持或 匹配近端通話器信號(Sgen)之背景雜訊。匹配背景雜訊藉由 保持真實背景雜訊之連續性使通信品質改進。沒有連續性 ’則遠端談話時遠端聽者無法聽見近端講話者。或者,遠 端談話時可有合成背景雜訊,然而,此可導致真實肯景雜 訊(近端談話時)及合成背景雜訊之間的破壞性交換(遠端談 話時)。因此,匹配背景雜訊有助於將此破壞性交換減至最 小。 監測及控制單元30包括遽波器係數監視器(例如滤波器 係數監視器102,其將參考圖6進一步說明),其用於決定是 否存在正確併合,使適應性濾波器28不會嘗試調適無效併 合。監測及控制單元3〇亦包括一增益監視器,用以控制選 擇性適應性濾波器35内之增益控制33。增益控制33之一目 的係保持通信系統1 〇的穩定性。為改進適應性濾波器28之 政率監測及控制單元30亦包括一純延遲決定器及稀疏窗定 位器(二者皆會參考圖7詳細說明)。監測及控制單元30亦包 括一音頻指示器及一音頻偵測器(將參考圖8詳細說明)。音 頻指示器及音頻偵測器可用於偵測通信系統1〇内之發信號 音頻。例如這些發信號音頻可包括具有用以在發信號音頻 之後傳送資料時關閉回音消除器之相位反轉的2丨〇〇沿音 頻。因此,回音消除器可根據需要關閉。另一方面,若適 應性濾波器28曝露於藉由傳送器12或傳送器14傳送之音頻 86017 -20- 200417167 (例如,單一或多個正弦頻率)中,則會導致通信系統i 〇的不 穩定性。因此,音頻偵測可用以防止適應性濾波器發散並 導致不穩定性。 上述具體實施例中,回音消除器20不包括非適應性濾波 器3 1及35。然而,一項具體實施例中,耦合至DC凹口波濾 波器45及加法器34之間的非適應性濾波器3丨可用於減小適 應性漉波器28之長度(將參考圖4進一步說明)。此具體實施 例中’非適應性遽波器3 1從監測及控制單元3〇接收Sin 38 及控制信號以產生Sin 39。同樣,一項具有非適應性濾波器 3 1的具體實施例中,回音消除器亦可包括耦合至加法器34 及非線性處理器32之間的非適應性濾波器35。非適應性濾 波器35可包括增益控制33或可為分離單元。此具體實施例 中’非適應性濾波器35補償非適應性濾波器31之效應,以 便近端信號Sgen不會失真。非適應性濾波器35從監測及控 制單元30接收錯誤信號46、控制信號,並提供錯誤信號47 至非線性處理器32。(非適應性濾波器3丨及35以下會參考圖 4進一步說明)。 為將信號注入Rin 43以產生R0Ut 40監測及控制單元3〇亦 會提供串列信號41至加法器36。串列信號41之注入可用以 估計併合回音路徑(自Rout 40穿過併合16回到sin 37之路 徑)之純延遲。純延遲指從Rout 4〇至Sin 37的最小時間延遲 。當通信開始(例如在電話會話之開始)無遠端信號時串列信 號41之注入可用以估計純延遲。應注意串列信號41係選擇 性。監測及控制單元3〇亦可接收控制17以啟動或關閉功能 86017 -21 - 200417167 模組之全部或一部分。 圖9包括流程200,其係根據本發明一項具體實施例之回 音消除器20的操作。流程200係回音消除器(例如圖2之回音 消除器20)提供之功能性的综述。流程200内每個步驟以下 皆會參考圖3至8及10至38詳細說明。流程200始於開始202 9並進入方塊204,其中Rin及Sin上皆執行DC凹口波濾波。 應注意若有加法器36或串列信號41,則DC凹口波濾波係在 加法器36之輸出(Rout 40)而非Rin 43上執行。如上所述,DC 凹口波濾波器45從Sin 37移除DC組件並產生Sin 38。同樣, DC凹口波濾波器49從Rin 43(或Rout 40,取決於串列信號41) 移除DC組件並產生Rin 44。接著流程200進入方塊206,其 中估計Rin 44之長期功率及Sin 38之短期功率。應注意長期 功率及短期功率係相對期間。即,長期功率係指在相比短 期功率較長時間週期上測量之功率。這些功率可藉由回音 消除器20之近端信號偵測器26計算出。 方塊206内計算出的功率接著用於決定近端通話器信號 偵測(near end talker signal detection ; NESD)限值。此NESD 限值接著會用於決定近端通話器信號(即Sgen)之存在。此決 定亦可藉由回音消除器20之近端信號偵測器26執行。流程 200接著進入方塊210,其中監測並控制適應性濾波器28。 方塊210包括方塊209、211及213。應注意監測及控制適應 性濾波器210之功能係選擇性。即任何方塊209、211及213 之組合皆可執行,或一個也不執行。方塊209中執行音頻指 示處理。此音頻指示處理可藉由監測及控制單元30執行, 86017 -22- 200417167 如以上參考圖2所說明,以下將參考圖8進一步說明。流程 200接著進入方塊211 ,其中偵測延遲(一項具體實施例中為 純延遲),並定位具有正確尺寸之濾波窗(稀疏窗)。即監測 及控制單元30可偵測延遲並定位稀疏窗,從而減小適應性 濾波器28之長度(即分接數量)。 縮短適應性濾波器長度之另一方法藉由方塊2丨3完成。一 項具體實施例係非適應性濾波器3丨及33與適應性濾波器28 炙組合,但濾波器長度很短。圖28至35將提供詳細說明。 監測及控制適應性滤波器210之後,流程2〇〇進入方塊2J2 ’其中使用適應性濾波器產生回音估計信號。例如,此可 對應產生回音估計信號48之適應性濾波器28,如以上參考 圖2所說明。流程200接著進入方塊214,其中估計錯誤信號 及錯誤信號之短期功率。即,方塊214可對應圖2之加法器 34,其藉由從Sin 39減去回音估計信號48估計錯誤信號46 。監測及控制單元30接著可用於估計錯誤信號46之短期功 率。 然後,流程進入方塊216,其中使用NESD限值偵測近端 通話器信號。即,在方塊216中,偵測Sgen*否存在(是否 有信號從圖1之傳送器12傳送)。此可用圖2之近端信號偵測 器26執行。流程進入方塊218,其中偵測並選擇性調整增益 控制33之增益,以保持通信系統1〇及適應性濾波器28之穩 定性(以下會詳細說明)。流程200接著進入決定菱形220,其 中決定滤波器係數是否需要更新。例如,如上所述,若l§gen 存在,錯誤信號46包括近端通話器信號(sgen)及殘餘回音組 86017 -23- 200417167 件。此情形中,適應性濾波器28不應更新,因為錯誤信號 46不代表剛才的殘餘回音。流程進入決定菱形224。然而, 若決定Sgen不存在(即近端通話器靜寂),則適應性濾波器“ 可更新,流程進入方塊222,其中在繼續至決定菱形m前 更新適應性滤波器28之濾波器係數。 在決疋菱形224 ,決定是否需要背景處理。一項具體實施 例中旁$處理在回音消除器20之操作過程中週期性執行 。替代具體實施例中,可在不同時間完成,例如根據各種 適應性濾波器處理狀態。若不執行背景處理,流程進入步 驟230,其中執行非線性處理。然而,若執行背景處理,流 程進入方塊226,其中備份滤波器係數。即,適應性滤波器 28之濾波器係數可儲存(例如一儲存單元内,其可位於回音 消除器20内或回音消除器2叫部)。流程接著進人方塊^ ’其中偵測it波器係數以決定是否存在用於回音消除器穩 定性控制之併合。 ^ 月豕處理之後,若有,流程進入非線性處理,其中減 少或移除任何剩餘的殘餘回音並视需要插入背景雜訊。若 有更多樣本藉由Rin43及Sin37(位於決定菱形232)接收則 回至方塊204之下一樣本繼續處理,否則流程在結束幻4完 成。應注意在電話應用程式中,由於信號通常包括語音信 號取樣速率通常係8 kHz。因此一項具體實施例中,取樣速 率為8 kHz,其中每隔〇· 125邮接收咖似如^之樣本。 然而,替代具體實施例中,可使用不同取樣速率。例如, 曰术應用私式通g需要較高取樣速率。此外,數位應用程 86017 -24 - 200417167 式中,’取㈣率可取祕數位資訊之傳送速率。 應注意圖9内步騾代表本發明之一 體實施例可以各種不同順序執行…,實施例。替代具 U貝序執仃延些步騾,其中-些步騾 執行甚一至可多、更少或與其他步驟同時執行。同樣,流程 -些步驟可為選擇性’而其他具體實施例可使用額外 或不同步驟執行任何需要之操作。因此,熟習技術人士應 月白可叱有彳多變更,流程200僅為回音消除器操作一範例 。同樣’回音消除器2〇亦只說明一項可能的具體實施例。 替代具體實施例可使用更多或更少方塊或單元,執行圖2說 明之全部、部分甚或與之不同的功能。因此,圖^之回音消 除器20只應視為一範例。亦應注意圖2之方塊及圖9之步騾 可全部藉由資料處理器(例如微處理器、數位信號處理器等 等)上運行之軟體,藉由硬體或藉由硬體及軟體之組合來執 行0 圖3係近端信號偵測器26的一項具體實施例。近端信號偵 測器26之操作將參考圖1〇至13說明。近端信號偵測器26及 圖10至13之流程提供快速及可靠的偵測,而不會受回音路 徑延遲及回音返回損失(echo return loss ; ERL)之影響,其 係由於回音路徑内傳送及併合損失而導致的回音消除器 Rout埠至Sin埠之信號衰減。如上所述,當偵測近端通話器 信號時(即當偵測Sgen之存在時),為防止調適發散,調適方 法(為將殘餘回音之平均功率減至最小影響適應性濾波器 28之係數)終止,因為近端通話器信號之存在表示錯誤信號 46不單獨係回音造成之錯誤。應注意當偵測近端信號時調 86017 -25- 200417167 適方法終止,不論近端信號是否在單一對話情形中(即只有 一個近端通話器)或者雙對話情形(當近端通話器及遠端通 話器皆有時)。除終止調適方法外,濾波器係數可需要從備 份濾波器係數恢復。此外,當無近端及遠端信號時,亦中 斷調適方法以防止回音消除器20調適通道雜訊或低錯誤信 號’從而將計算減至最小。因此當需要時回音消除器2〇操 作調適’例如當遠端信號相對較強且無近端信號時。此情 形中,適應性濾波器28可調適以正確估計作為估計信號48 义回音。同樣,如以下將要說明,近端通話器信號偵測限 值係「已換檔」(即調整過),取決於適應性濾波器方法之狀 態。 圖10至13說明之具體實施例亦提供備份並恢復適應性濾 波器28係數之方法。該方法可由狀態機控制,如圖13所說 明,其將備份數量及頻率減至最小且防止適應性濾波器28 發散。 圖3係近端信號偵測器26的一項具體實施例。信號位準估 計器追縱近端信號(Sgen)、遠端信號(Rin)及傳送路徑輸入 仏號(Sin)之位準。因此,近端信號位準估計器5〇接收錯誤 仏號46 ’遠端信號位準估計器52接收Rin 44,而sin信號位 準估計器54接收Sin 38。信號位準估計器接著用於控制近端 信號偵測(near-end signal detection ; NESD)限值選擇器 58及 近端信號偵測器60。背景處理器56監測適應性濾波器28之 處理狀態並控制NESD限值選擇器58及近端信號偵測器60。 應注意通常每個信號位準可在測量信號上應用低通濾波器 86017 -26- 200417167 ’可對功率或數值進行估計。同樣,以下圖3及10至13之說 明假定信號以8 kHz速率取樣(如上所述,其係正常語音應用 程式共同速率)。The Sm 37 is provided to the DC notch wave filter 45, and the DC 86017 -17- 200417167 component is removed from the Sin 37. It should be noted that in an alternative embodiment, a high-pass filter may be used for the position of the DC notch wave filter 45. Similarly, the output (Rout 40) of the adder 36 is provided to a DC notch wave filter 49 'to remove the DC component from the ROUt 40 (however, a high-pass filter may be used instead of the specific embodiment). The use of a DC notch / wave filter is less expensive than a two-pass filter in terms of lift and does not cause ripple effects. It helps to maintain gain flatness through the passband of the filter. In an alternative embodiment, a single common DC notch wave filter may be used to perform the functions of the DC notch wave filter 45 and the DC notch wave filter 49. It should be noted that the adder 36 receives Rin 43 and the serial signal 41 and provides the sum of the two signals Rout 40. However, if the serial signal 41 is zero, the output Rout 4 is the same as the input Rin 43. For the following description, the serial signal 41 is assumed to be zero and Rout 40 is equal to Rin 43. Also, pay attention to the selectivity of the non-adaptive filter 31 and the non-adaptive filter 35, which will be described further below. For the following description, it will be assumed that Sin 38 and Sill 39 are equal, and error signal 47 is a gain-adjusted version of error signal 46 without the effect of non-adaptive filter 35. Therefore, Sin 39 is a transmission signal that includes any Proximity (Sgen) transmitted by transmitter 12 and any reflection echo introduced from Rout 40 by merging 16. Therefore, 'Sin 39 can be expressed as "Sgen + Echo". The adaptive filter 28 provides an estimate of the reflected echo, i.e. the echo estimation signal 48 to the adder 34 'which outputs an error signal 46. Therefore, the error signal 46 can be expressed as "Sin 39-estimated echo 48" or replace sin 39 with the above-mentioned calculation formula, that is, "Sgen + echo-estimated echo 48". When the estimated echo is accurate (that is, equal to or substantially equal to the actual echo), the error signal 仏 will only include Sgen without any real 86017 -18-200417167 prime echo. This is the ideal situation. However, if the estimated echo is accurate, the error signal 46 will include Sgen and the residual echo components. In this case, the error signal 46 can be expressed as "Sgen + residual echo", where the residual echo ^ "echo-estimated echo". When there is no Sgen (i.e., when the near end is silent, meaning that the signal from the transmitter 12 is not transmitted), the error signal 46 only represents the residual echo. In this case, the error signal 46 may be used to perform an adaptive method to minimize residual echoes, as described in further detail below. However, if there is, the error signal 46 cannot be used to perform the adaptive method, because the adaptive filter 28 uses the error to adapt, the error signal 46 cannot adjust the error in the presence of Sgen. Therefore, Sgen needs to be checked to determine whether the adaptive method can be performed. The near-end signal detector 26 coupled to receive Sin 38 (which is equal to sin 39 in this example) and Rin 44 uses an error signal from the monitoring and control unit 30 and a control signal to detect the presence of Sgen (ie, to detect transmission The presence of a near-end talker on the device 12). In the adaptive filter unit 28, the echo estimation signal 48, y (k) is calculated by y (k) = XT (k) · H (k), where X (k) = [x (k), x (k _1), ..., x (k _ N + 1) is an input signal vector that extends to the duration of the FIR filter range; x (n) = Riri44. H (k) is the filter coefficient vector for the k-th iteration, where H (k) = [h0 (k), hKk), ...,! ^-#)] 1. The actual update of the filter coefficients is controlled by a general LMS algorithm. H (k + l) = H (k) + step-size 4 ιτογ (1 < :) × () < :) 'Where error (k) corresponds to the error signal 46; stepjize controls the adaptation rate; and H (k + 1) is the new filter coefficient vector. Any residual echo in the error signal 46 can be further reduced or removed by the non-linear processor 32. The non-linear processor 32 receives an error 86017 -19- 200417167 error signal 47 (a gain-adjusted version of the error signal 46 in this specific embodiment) and a control signal from the monitoring and control unit 30 to generate Sout 42, which is not ideal in the ideal situation. Include echo. In addition to reducing or removing residual echo, the non-linear processor 32 also attempts to maintain or match the background noise of the near-end talker signal (Sgen). Matching background noise improves communication quality by maintaining continuity of real background noise. Without continuity, 'the far-end listener cannot hear the near-end talker during the far-end conversation. Alternatively, there may be synthetic background noise in the far-end conversation, however, this may lead to a destructive exchange between real-world noise (in the near-end conversation) and synthetic background noise (in the far-end conversation). Therefore, matching background noise helps to minimize this disruptive exchange. The monitoring and control unit 30 includes a wavelet coefficient monitor (such as the filter coefficient monitor 102, which will be further explained with reference to FIG. 6), which is used to determine whether there is a correct merge so that the adaptive filter 28 does not attempt to adapt to invalidity Merge. The monitoring and control unit 30 also includes a gain monitor for controlling the gain control 33 in the selective adaptive filter 35. The purpose of the gain control 33 is to maintain the stability of the communication system 10. The rate monitoring and control unit 30 for improving the adaptive filter 28 also includes a pure delay determiner and a sparse window positioner (both will be described in detail with reference to FIG. 7). The monitoring and control unit 30 also includes an audio indicator and an audio detector (which will be described in detail with reference to FIG. 8). The audio indicator and audio detector can be used to detect the signal audio in the communication system 10. For example, these signaled audios may include a 200 edge audio with phase inversion to turn off the echo canceller when transmitting data after the signaled audio. Therefore, the echo canceller can be turned off as needed. On the other hand, if the adaptive filter 28 is exposed to the audio 86017-20-200417167 (e.g., single or multiple sinusoidal frequencies) transmitted by the transmitter 12 or the transmitter 14, the communication system i stability. Therefore, audio detection can be used to prevent the adaptive filter from diverging and causing instability. In the above specific embodiment, the echo canceller 20 does not include the non-adaptive filters 31 and 35. However, in a specific embodiment, the non-adaptive filter 3 coupled between the DC notch wave filter 45 and the adder 34 can be used to reduce the length of the adaptive wave filter 28 (further referring to FIG. 4 Description). In this embodiment, the 'non-adaptive waver 31 receives Sin 38 and a control signal from the monitoring and control unit 30 to generate Sin 39. Similarly, in a specific embodiment with a non-adaptive filter 31, the echo canceller may also include a non-adaptive filter 35 coupled between the adder 34 and the non-linear processor 32. The non-adaptive filter 35 may include a gain control 33 or may be a separate unit. In this embodiment, the 'non-adaptive filter 35 compensates for the effect of the non-adaptive filter 31 so that the near-end signal Sgen is not distorted. The non-adaptive filter 35 receives the error signal 46, the control signal from the monitoring and control unit 30, and provides the error signal 47 to the non-linear processor 32. (Non-adaptive filters 3 丨 and 35 will be further explained with reference to FIG. 4). The monitoring and control unit 30 for injecting a signal into Rin 43 to generate R0Ut 40 will also provide a serial signal 41 to an adder 36. The injection of the serial signal 41 can be used to estimate the pure delay of the merge echo path (the path from Rout 40 through merge 16 to sin 37). Pure delay refers to the minimum time delay from Rout 40 to Sin 37. The injection of the tandem signal 41 can be used to estimate the pure delay when there is no remote signal at the beginning of the communication (e.g. at the beginning of a telephone session). It should be noted that the serial signal 41 is optional. The monitoring and control unit 30 can also receive control 17 to enable or disable the function 86017 -21-200417167 All or part of the module. FIG. 9 includes a flow 200 that illustrates the operation of the echo canceller 20 according to a specific embodiment of the present invention. Process 200 is an overview of the functionality provided by an echo canceller (e.g., echo canceller 20 of FIG. 2). Each step in the process 200 will be described in detail with reference to FIGS. 3 to 8 and 10 to 38 below. The process 200 starts at 202 9 and proceeds to block 204, where DC notch wave filtering is performed on both Rin and Sin. It should be noted that if there is an adder 36 or a tandem signal 41, the DC notch wave filtering is performed on the output (Rout 40) of the adder 36 instead of Rin 43. As described above, the DC notch wave filter 45 removes the DC components from Sin 37 and generates Sin 38. Similarly, the DC notch wave filter 49 removes the DC component from Rin 43 (or Rout 40, depending on the serial signal 41) and generates Rin 44. Flow 200 then proceeds to block 206 where the long-term power of Rin 44 and the short-term power of Sin 38 are estimated. It should be noted that long-term power and short-term power are relative periods. That is, long-term power refers to power measured over a longer period of time than short-term power. These powers can be calculated by the near-end signal detector 26 of the echo canceller 20. The power calculated in block 206 is then used to determine the near end talker signal detection (NESD) limit. This NESD limit is then used to determine the presence of the near-end talker signal (ie, Sgen). This decision can also be performed by the near-end signal detector 26 of the echo canceller 20. Flow 200 then proceeds to block 210 where the adaptive filter 28 is monitored and controlled. Block 210 includes blocks 209, 211, and 213. It should be noted that the function of monitoring and controlling the adaptive filter 210 is selective. That is, any combination of blocks 209, 211, and 213 can be executed, or none of them can be executed. In block 209, audio instruction processing is performed. This audio instruction processing can be executed by the monitoring and control unit 30. 86017 -22- 200417167 is as described above with reference to FIG. 2, and will be further described below with reference to FIG. 8. The process 200 then proceeds to block 211, where the delay is detected (pure delay in a specific embodiment), and a filter window (sparse window) with the correct size is located. That is, the monitoring and control unit 30 can detect the delay and locate the sparse window, thereby reducing the length (i.e., the number of taps) of the adaptive filter 28. Another method to shorten the length of the adaptive filter is done by blocks 2 丨 3. A specific embodiment is a combination of the non-adaptive filters 3 and 33 and the adaptive filter 28, but the filter length is short. Figures 28 to 35 will provide detailed explanations. After monitoring and controlling the adaptive filter 210, the process 200 proceeds to block 2J2 'where the adaptive filter is used to generate an echo estimation signal. For example, this may correspond to an adaptive filter 28 that generates an echo estimation signal 48, as explained above with reference to FIG. The process 200 then proceeds to block 214 where the error signal and the short-term power of the error signal are estimated. That is, block 214 may correspond to the adder 34 of FIG. 2 which estimates the error signal 46 by subtracting the echo estimation signal 48 from Sin 39. The monitoring and control unit 30 can then be used to estimate the short-term power of the error signal 46. The flow then proceeds to block 216 where the near-end talker signal is detected using the NESD limit. That is, in block 216, the presence or absence of Sgen * is detected (whether a signal is transmitted from the transmitter 12 of FIG. 1). This can be performed using the near-end signal detector 26 of FIG. The flow proceeds to block 218, where the gain of the gain control 33 is detected and selectively adjusted to maintain the stability of the communication system 10 and the adaptive filter 28 (described in detail below). The process 200 then proceeds to a decision diamond 220, where it is determined whether the filter coefficients need to be updated. For example, as described above, if l§gen exists, the error signal 46 includes the near-end talker signal (sgen) and the residual echo group 86017 -23- 200417167. In this case, the adaptive filter 28 should not be updated because the error signal 46 does not represent the residual echo just now. The flow goes to decision diamond 224. However, if it is determined that Sgen does not exist (ie, the near-end talker is silent), the adaptive filter is "updatable" and the flow proceeds to block 222, where the filter coefficients of the adaptive filter 28 are updated before proceeding to the decision diamond m. At the decision diamond 224, it is determined whether background processing is required. In a specific embodiment, the side processing is performed periodically during the operation of the echo canceller 20. In alternative embodiments, it can be completed at different times, for example according to various adaptations If the background processing is not performed, the flow proceeds to step 230, where non-linear processing is performed. However, if the background processing is performed, the flow proceeds to block 226, where the filter coefficients are backed up, that is, the filtering of the adaptive filter 28 The filter coefficients can be stored (for example, in a storage unit, which can be located in the echo canceller 20 or the echo canceller 2). The process then proceeds to the block ^ 'where the wave filter coefficients are detected to determine whether there is an echo canceler. Controller stability control. ^ After processing, if any, the process enters non-linear processing, which reduces or removes any remaining residual The remaining echoes and background noise are inserted as needed. If there are more samples received by Rin43 and Sin37 (located at the decision diamond 232), return to the sample under block 204 to continue processing, otherwise the process is completed at the end of Magic 4. It should be noted that In a telephone application, since the signal usually includes a voice signal, the sampling rate is usually 8 kHz. Therefore, in a specific embodiment, the sampling rate is 8 kHz, and samples like ^ are received every 0.125 post. However, instead In a specific embodiment, different sampling rates may be used. For example, a higher sampling rate is required for private applications. In addition, in digital applications 86017 -24-200417167, the fetch rate can be determined by the transmission rate of the secret digital information. It should be noted that the steps shown in FIG. 9 represent one embodiment of the present invention which can be executed in various different orders ..., embodiments. Instead of executing the steps with a U.S. sequence, some steps can be performed in the most, the fewer Or performed concurrently with other steps. Similarly, some steps of the process may be optional, and other embodiments may use additional or different steps to perform any desired operation. Therefore, There may be many changes for the technicians in Yuebai. The flow 200 is only an example of the operation of the echo canceller. Similarly, the “echo canceller 20” also only describes one possible specific embodiment. Alternative specific embodiments may use more Or fewer blocks or units that perform all, part, or even different functions described in FIG. 2. Therefore, the echo canceller 20 of FIG. ^ Should only be regarded as an example. Note also the blocks of FIG. 2 and the steps of FIG. 9骡 All software running on data processors (such as microprocessors, digital signal processors, etc.) can be performed by hardware or by a combination of hardware and software. Figure 3 is near-end signal detection A specific embodiment of the detector 26. The operation of the near-end signal detector 26 will be described with reference to Figs. 10 to 13. The processes of the near-end signal detector 26 and Figs. 10 to 13 provide fast and reliable detection, and It will not be affected by the echo path delay and echo return loss (ERL). It is the signal attenuation of the echo canceller Rout port to Sin port due to transmission and merging loss in the echo path. As mentioned above, when detecting near-end talker signals (that is, when detecting the presence of Sgen), in order to prevent the adaptation from diverging, the adaptation method (to reduce the average power of the residual echo to a minimum affects the coefficient of the adaptive filter 28 ), Because the presence of the near-end talker signal indicates that the error signal 46 is not an error caused by the echo alone. It should be noted that when detecting the near-end signal, adjust 86017 -25- 200417167 to terminate it properly, regardless of whether the near-end signal is in a single conversation situation (that is, there is only one near-end talker) or a dual-talk situation (when the near-end talker and remote End talkers are sometimes). In addition to the termination adaptation method, the filter coefficients may need to be recovered from the backup filter coefficients. In addition, when there are no near-end and far-end signals, the adaptation method is also discontinued to prevent the echo canceller 20 from adapting to channel noise or low error signals, thereby minimizing the calculation. Therefore, the echo canceller 20 is adapted for operation when needed ', for example when the far-end signal is relatively strong and there is no near-end signal. In this case, the adaptive filter 28 can be adapted to use the correct estimate as the estimated signal 48 echo. Similarly, as will be explained below, the near-end talker signal detection limit is "shifted" (that is, adjusted) and depends on the state of the adaptive filter method. The specific embodiments illustrated in FIGS. 10 to 13 also provide a method for backing up and restoring the adaptive filter 28 coefficients. This method can be controlled by a state machine, as illustrated in Figure 13, which minimizes the number and frequency of backups and prevents the adaptive filter 28 from diverging. FIG. 3 shows a specific embodiment of the near-end signal detector 26. The signal level estimator tracks the level of the near-end signal (Sgen), the far-end signal (Rin), and the transmission path input signal (Sin). Therefore, the near-end signal level estimator 50 receives an error # 46 ', and the far-end signal level estimator 52 receives Rin 44 and the sin signal level estimator 54 receives Sin 38. The signal level estimator is then used to control a near-end signal detection (NESD) limit selector 58 and a near-end signal detector 60. The background processor 56 monitors the processing status of the adaptive filter 28 and controls the NESD limit selector 58 and the near-end signal detector 60. It should be noted that usually a low-pass filter can be applied to the measurement signal at each signal level 86017 -26- 200417167 ′ to estimate the power or value. Similarly, the descriptions in Figures 3 and 10 to 13 below assume that the signal is sampled at 8 kHz (as described above, which is the common rate for normal speech applications).

Sin信號位準估計器54之一項具體實施例使用下列公式 得到Sin之功率(Psin)。A specific embodiment of the Sin signal level estimator 54 uses the following formula to obtain the power (Psin) of Sin.

公式 1 : Psin(n)= [(N -l)PSin(n _l)+(Sin(n))2]/N 以上公式中,Sin(n)係在時間η輸入回音消除器2〇之傳送路 徑’ Psin(n)係在時間η之估計傳送路徑輸入信號功率,^^係 平滑因數,一項具體實施例中其假定為32。替代具體實施 例中Ν值可使用一範圍。通常,ν應選擇足夠大,以便sin 功率估計不會對Sin之迅速變化過於敏感。另一方面,n不 能大至使Sin之功率估計敏感到足以追蹤語音信號位準,功 率估計延遲係最小化。或者,功率可使用窗尺寸為 本之移動平均方法估計。圖中可看出此方法提供與根據公 式1之功率估計器相等的頻寬。 近端“號位準估計器50接收錯誤信號46並在時間η獲得 近端信號功率。儘管如上所述,但對回音消除器20之近端 L號(Sgen)並無直接寸取。即,Sin 38係Sgen及來自Rin 44 的反射回音之混合。因此,一項近端信號位準估計器50的 具體實施例使用Sin 39(其係Sin 38之濾波版本,假定滤波器 位於DC凹口波濾波器45及圖2之加法器34之間)及回音估計 器信號48之間的差異。因此,錯誤信號46提供給近端信號 位準估計器50。錯誤信號46係回音消除器20可用Sgen之最 接近估計,但此估計之精確性係適應性濾波器28之會聚狀 86017 -27- 200417167 態的功能。理想地係當適應性濾波器完全會聚時,回音之 估計(回音估計信號48)係精確。在實踐中,如上所述,回音 估計信號48通常不等於來自Rin 44之反射回音,因此錯誤信 號46不僅係sgen,而是Sgen+殘餘回音。由於適應性方法在 時間特定窗繼續,殘餘回音引入之錯誤減至最小。因此, 近端信號位準估計器50的一項具體實施例使用以下公式:Formula 1: Psin (n) = [(N -l) PSin (n _l) + (Sin (n)) 2] / N In the above formula, Sin (n) is the transmission of the input echo canceler 20 at time η. Path 'Psin (n) is the estimated transmission path input signal power at time η, and ^^ is a smoothing factor, which is assumed to be 32 in a specific embodiment. Instead of a specific embodiment, a range of N values may be used. In general, ν should be chosen large enough so that the sin power estimate is not too sensitive to rapid changes in Sin. On the other hand, n cannot be large enough to make Sin's power estimation sensitive enough to track the speech signal level, and the power estimation delay is minimized. Alternatively, the power can be estimated using a moving average method with a window size of itself. It can be seen in the figure that this method provides the same bandwidth as the power estimator according to Equation 1. The near-end "level estimator 50 receives the error signal 46 and obtains the near-end signal power at time n. Although described above, there is no direct measure of the near-end L number (Sgen) of the echo canceller 20. That is, Sin 38 is a mix of Sgen and reflected echo from Rin 44. Therefore, a specific embodiment of the near-end signal level estimator 50 uses Sin 39 (which is a filtered version of Sin 38, assuming that the filter is located in a DC notch wave) The difference between the filter 45 and the adder 34 in FIG. 2) and the echo estimator signal 48. Therefore, the error signal 46 is provided to the near-end signal level estimator 50. The error signal 46 is an echo canceller 20 available with Sgen Is closest to the estimate, but the accuracy of this estimate is the function of the convergence state of the adaptive filter 28 86017 -27- 200417167 state. Ideally, it is the estimate of the echo when the adaptive filter is fully converged (echo estimation signal 48) Is accurate. In practice, as described above, the echo estimation signal 48 is usually not equal to the reflected echo from Rin 44, so the error signal 46 is not only sgen, but Sgen + residual echo. Since the adaptive method continues at a time-specific window The errors introduced by the residual echo are minimized. Therefore, a specific embodiment of the near-end signal level estimator 50 uses the following formula:

公式 2 · Perror(n)= [(N _l)Perror(n _l)+(error signal 46)2]/N 以上公式中,錯誤信號46係Sin39及位於加法器34輸出之 回音估計信號48之間的差異,Perror(n)係在時間n之估計近端 信號功率,N係估計器之平滑因數(當前具體實施例中係 32) 〇 遠端信號位準估計器52之一項具體實施例獲得Rin一短 期功率並使用其計算Rin—些過去短期功率估計之Rin平均 功率’其覆蓋回音路徑之範園。例如,一項具體實施例使 用下列公式決定Rin短期功率: 公式 3 ·· PRin(kN)=^^(Rin(kN — 1,2, ·· · 八 ι·=0 上述公式中,Rin(kN- i)係在時間kN- i輸入回音消除器2〇 之接收路徑,PRin(kN)係在時間kN之估計遠端信號功率(應 注思為減少計算成本’估計pRin(kN)係每隔N個樣本而非每 個樣本)。N係窗尺寸(一項具體實施例中係32)。因此,公式 4计算Rin在當前窗(尺寸N)每隔N個樣本之功率,其中&保持 窗軌道。即,第一窗(k=l)可由樣本1至32定義,下一窗化^) 可由樣本33至64定義等等。因此獲得遠端信號之平均功 86017 -28- 200417167 率。 公式4 : AVG P她(狀)=士ζρ伽(卜―㈣k=l,2,… 上述公式中,「PRin((k · i)N)係在時間(k-i)N之遠端信號功 率估計的過去Μ快照,其中i = Μ -1、Μ -2、…、0。AVG PRin(kN)係在時間kN之遠端信號位準估計平均值,μ係此平 均值之窗尺寸,其中Μ=16,用於回音消除器,其設計為覆 蓋高至64 ms(即Μ * Ν =16*32=512樣本)之回音路徑延遲。 例如,若當前窗係第16窗(即k=16),則AVG PRin(kN)值採用 PRin(kN)值平均值,其計算係用於每16個先前窗,即pRin(16* N) > PRi„(15* N).....PRin(2* N)、PRin(N)之平均值。若無 足夠之先前資料(即已處理窗少於M個),則只有那些可用值 可用以決定平均值且零可用於仍未計算的值。例如,對於 第3窗(k=3),只有兩個先前pRin(kN)值可用,因此,AVg PRin(kN)係3個值之平均值而非M值。應注意AVG pRijkN)係 每隔N個樣本計算,如參考圖1〇所見,計算AVG Pb(kN)之 後,k值可遞增以指示下N個樣本窗之開始。 替代具體實施例中,遠端信號位準估計器52可使用上述 a式1或2(其中n=256)估計Rin平均功率。使用公式4,AVg PRin(kN)測量亦應採用每隔32個樣本。亦應注意上述位準估 汁可使用數值而非功率完成。同樣,應注意上述公式⑴ 係以標稱速率處理資料,而公式3及4係在連續N尺寸窗執行 子速率#算(從而每隔_樣本執行計算)。替代具體實施例 1 構成上述公式’並不限於以上所提供之公式。 86017 -29· 200417167 近端(Sgen)、遠端(Rin)及傳送路徑輸入(Sin)信號位準估 計用於近端通話器信號偵測之控制。因此圖10係圖9之方塊 206及208的一項具體實施例,其中決定近端信號偵測限值 (NESD_Threshold)。限值每隔N個樣本重新評估,其中在當 前具體實施例中N為32。方塊250中決定Rh、PRin之短期功 率(例如見上述公式3),其中當前時間η對應正在分析的當前 樣本。方塊252中,樣本計數器遞增,從而提供新η值。因 此樣本每次通過圖9之流程200時(即每次通過2〇6及208時) 皆遞增。 流程進入決定菱形254,其中決定樣本計數器是否已達到 窗尺寸Ν。若否,流程進入方塊270(應注意NESD一Threshold 未更新)。方塊270中計算Sin(Psin)之功率(例如見上述公式1) 。若樣本計數器已達到N,則流程進入方塊256,其中計數 器重設,以便每隔N個樣本方採用方塊256至268之路徑(一 項具體實施例中係每隔32個樣本,N等於32)。重設樣本計 數器後(一項具體實施例中重設為零),流程進入方塊258, 其中計算Rin,AVG PRin,之平均功率(例如見上述公式4)。 之後,流程進入決定菱形260,其中決定BACKUP_STATE是 否係0或1(應注意BACKUP JTATE將參考圖13詳細說明)。若 是,流程進入方塊262,其中K1用以調整以下公式5所示之 NESD_Threshold : 公式 5 ·· NESD_Threshold = K1*AVG PRin 然而,若BACKUP—STATE並非0或1,則流程進入方塊264 ,其中K2用於調整以下公式6所示之NESD—Threshold : 86017 -30- 200417167 公式 6 : NESD_Threshold = K2* AVG PRin 因此,NESD—Threshold每隔N個樣本重新評估一次,取決 於適應性濾波器之狀態(即BACKUP_STATE,對應狀態機, 其將參考圖13進一步說明),NESD_Threshold可定為K1* AVGPRini^K2*AVGPRin cKl 及 K2 係 NESDP 艮值比例因數。在 適應性濾波器28之調適方法的初始相位(即當BACKUP_STATE 為0或1時),NESD_Threshold可相對較大,為適應性濾波器 28提供更多調適機會。另一方面,當適應性濾波器28已通 過初始調適相位時(即當B ACKUP_STATE為3或4時), NESD—Threshold可減小,以防止調適方法發散。一項具體 實施例中,K1設置為1至2範圍内一值,而K2設置為0.25至1 範圍内一值。例如,一項具體實施例中,根據併合狀況, K1為1而K2為0.5。此外,在適應性方法中這些K1及K2值可 靜態或動態設置。可使用上述給定範圍之外的替代值,調 適方法仍然在初始相位時可使用其他方法、與4狀態(例如 BACKUP一STATE0至3)狀態機不同之用法來決定。 於方塊262或264調整NESD—Threshold後,流程進入決定 菱形266,其中決定NESD—Threshold是否小於A。若否,流 程進入計算Psin之方塊270。若是,在方塊268將NESDJThreshold 設置為A。即在AVG PRin過小之情形中,NESD一Threshold限 制在A的最小位準(其中在一項具體實施例中A可對應範圍 -40至-45 dBmO内一值)。接著流程進入方塊270。 圖10之流程完成後,視需要執行適應性濾波器28之監測 及控制(見圖9之方塊210)。(應注意方塊209、210及211以下 86017 -31- 200417167 將參考圖20至34詳細說明)之後,在方塊212適應性濾波器 產生回音估計信號48,流程進入方塊214及216,其會參考 圖11進一步詳細說明。即,圖11之流程說明圖9之方塊214 及2 1 6之一部分’其詳細說明近端通話器信號偵測之控制 (即Sgen之偵測)。 方塊276中估計錯誤信號46之功率(Perror)(見上述公式2)。 流程接著進入決定菱形278,其中決定Perror及PSin中較小一 方是否大於 NESD—Threshold(即是否 MIN(Perrc)r,psin)> NESD一Threshold)。若是,流程進入決定菱形280,其中決定 NESD—Hangover計時器是否倒計時至零。若已完成,則近端 信號已偵測。即,只有當MIN(Perror,PSin)> NESD_Threshold 且過去一特定時間窗(對應NESD—Hangover計時器)無近端 信號已偵測時才偵測近端信號。若在決定菱形278, MIN(Perr〇r,PSin)未大於NESD—Threshold,流程進入方塊290 ,其中NESD—Hangover計時器值遞減至零,從而引入由 NESD_Hangover時間決定之暫停。若在決定菱形280, NESD_Hangover計時器非零,則NESD一Hangover計時器在方 塊286設置為一預定值。 若已偵測近端信號(Sgen),流程從決定菱形280進入決定 菱形282,其中決定滤波器係數是否已更新。若是,假定由 於近端信號之存在該等係數通常很可能毀損。即,因為用 於係數更新之信號不再是純殘餘回音,而是殘餘回音與 Sgen之混合,因此該等係數不再代表估計回音。此情形中 ,流程進入方塊284,其中遽波器係數恢復或由一組已證明 86017 -32· 200417167 「良好」之濾波器係數取代。備份及恢復濾波器係數之方 法將在以下參考圖12及13說明。流程接著進入方塊288,其 中更新BACKUP_STATE。若濾波器係數未在決定菱形282 更新,則不會假定該等係數毁損,因為他們還未使用殘餘 回音及Sgen之混合調適。此情形中,流程進入方塊286,其 中NESD—Hangover計時器設置為預定值。 用於NESD一Hangover計時器之NESD—Hangover時間的持 續時間係選擇以確保Sgen不再出現於開始濾波器係數調適 之前,並且避免不需要的濾波器係數調適及恢復。例如一 項具體實施例中,NESD_Hangover時間係160樣本,或20毫 秒。因此,NESDJHangover時間的持續時間防止近端信號 偵測器26過於敏感,從而將近端通話器信號之偵測及缺少 近端通話器信號之彳貞測之間的交換減至最小。然而,若 NESDJHangover時間設置過長,近端信號偵測器26可能不 足以敏感至在需要時精確偵測近端通話器信號。 因此,在Sgen及Rin之信號位準(即功率)的不同組合下, 採用不同的關於濾波器係數(例如適應性濾波器28之係數) 之動作。例如,這些動作可使用下列表格概述。 項 目 Sgen Sin Rin 動作 說明 1 低 低 低 不更新 無近端或遠端通話器信 號出現 2 低 低 高 更新係數 具有大量併合衰減之單 一遠端通話器信號 86017 -33- 200417167 3 低 高 低 n/a 非有效組合 4 低 高 高 更新係數 具有小量併合衰減之單 一遠端通話器信號 5 高 低 低 n/a 非有效組合 6 高 低 高 n/a 非有效組合 7 高 高 低 凍結更新及恢 復濾波器係數 單一近端通話器信號出 現 8 高 高 )東結更新及恢 復濾波器係數 雙對話(近端及遠端通話 器信號皆出現) 表格1 由於Sin係Sgen及回音或Rin之混合,上述表格中列出的幾 個組合並非正常操作模式(意味著連結未斷開或無外部信 號注入電路)下的有效組合。無效組合係專案3(由於Sgen及 Rin皆低時Sin不能高)、專案5及6(由於Sgen高時Sin不能低) 。三組動作用於剩餘5個組合。首先,係數調適方法之狀況 係當Rin高而Sgen低時(單一遠端對話週期中,不論sin是否 高或低,即分別為專案2及4)。在這些狀況下,錯誤(錯誤信 號46)主要係由於殘餘回音(由於sgen較低),以⑼對調適之 影響最小。其次,終止濾波器係數調適處理器及恢復先前 預足「良好」濾波器係數之狀況係當Sgen較高時(近端對話 週期中,不論單一對話或雙對話,即分別為專案7及8)。第 二,當近端及遠端通話器皆靜寂時不需要更新(專案丨)。 當回音返回損失接近或少6 dB時上述用於偵測Sgen之方 法楗供消除回音的能力。因此,接近或小於6 dB(例如上述 86017 -34- 200417167 表格1内專案4)時,上述方法使用以⑶之最小值(如上所述其 可估計為錯誤信號46,假定殘餘錯誤較小或可忽略)及導致 這些狀況下播錯誤偵測之Sin,而不同於先前解決方案,其 了丈這些較低位準(接近或小於6 dB)回音返回損失變更之 嚴重影響且因此傾向於在Sgen實際上未出現時錯誤偵測其 存在。此外,當回音返回損失高達〇犯時(無併合衰減)上述 方法使調適方法可繼續,使回音消除,不同於先前解決方 案’其中調適方法在例如6 dB位準終止。 同樣,上述參考圖10及11之方法提供Sgen之快速偵測, 甚至當其位準相比Rin較低時(對應上述表格i内專案8)。例 如,先前解決方案將雙對話偵測限值設置為大於或等於Rin 能量1/4之Sin能量(即對應併合電路引入的6昍損失)。若併 合衰減為10 dB,則偵測限值内4 dB差異會足夠大至使Sgen 信號大量存在,而不會偵測為雙對話。因此,這些先前解 決方案無法總是偵測近端通話信號,或偵測的過遲。上述 方法使用Sgen最小值(如上所述其可估計為錯誤信號邾,假 定殘餘錯誤較小或可忽略)及與Rin比較用於近端信號偵測 之Sin,偵測限值(NESD 一 Threshold設置與導致較先前可用解 決方案更快及更可靠之近端信號偵測的回音返回損失無關。 此外,上述參考圖1〇及1丨之方法提供在具有一些雜訊背 景時區分雙對話(上述表格内專案8)及單一遠端對話(上述 表格1内專案4)。當近端背景雜訊位準較高,先前解決方案 將此狀況作為雙對話偵測,並終止調適方法。由於背景雜 訊可存在很長時間,即使對於整個電話呼叫持續時間,適 86017 -35- 200417167 應性濾波器仍無法改變會聚。因此在本文上述近端信號偵 測中使用Sgen最小值及Sin對Rin使偵測限值(NESD_Threshold) 可設置成即使當背景雜訊位準較高時適應性方法仍會繼績 。(應注意唯一正確之雙對話狀況係Rin及Sgen信號位準皆較 高時。然而,當偵測近端通話器信號時,不論是否在單一 近端通話週期或雙對話週期,本文說明之調適方法應終止 ,濾波器係數應恢復。) 圖12說明圖9中決定菱形224及方塊226之一部分,其中決 定背景方法是否執行,若是,備份滤波器係數。圖12之流 程主要處理濾波器係數(適應性濾波器28)備份政策。備份政 策之一項具體實施例確保良好濾波器係數週期性備份,以 便將備份數量減至最小,且將備份頻率減至最小。圖12以 方塊291開始,其中背景1計數器遞增。流程進入決定菱形 293 ’其中決定背景1計數器是否已到達預定計數器值,j。 若否,則流程進入點Η(圖9方塊228之後)。若是,流程進入 方塊298,其中背景1計數器重設(至零),然後進入決定菱形 295 ’其中決定適應性濾波器28之濾波器係數是否已更新。 若否,流程進入點Η。若是,流程進入方塊292,其中背景2 計數器遞增。 接著流程進入決定菱形294,其中決定背景2計數器是否 已到達預定計數器值,L。若否,流程進入點Η。若是,流 程進入執行背景處理之方塊296。即,此具體實施例中背景 處理至多每隔J * L個樣本執行,這些值可設置為任何 有助於決定背景處理頻率的值。例如,一項具體實施例中; 86017 -36- 200417167 為160樣本,L為10,其中背景處理至多每隔J * L或1600個 樣本執行。即,若J個樣本之後適應性濾波器28之濾波器係 數未更新,則流程進入點Η,背景2計數器不遞增。因此, 只有係數在J個樣本之當前窗中已更新,背景2計數器才會 遞增並與L計較方塊296中,背景2計數器重設(此具體實施 例中重設為零)。流程從方塊296繼續至決定菱形300。 在決定菱形300中,決定當前BACKUP_STATE(其將參考 圖13詳細說明)是否係0或1。若是,則BACKUP_STATE在方 塊304遞增,流程進入方塊308。若BACKUP_STATE並非0或 1,流程進入決定菱形302,其中決定BACKUP_STATE是否 為2。若否,流程進入方塊306(表示BACKUP—STATE為3), 其中BACKUP—STATE設置為2且流程進入方塊310。若在決 定菱形302 BACKUP_STATE為2,流程進入方塊308,其中 候選備份係數複製到良好備份係數。(應注意候選及良好備 份係數以下將參考圖13說明)接著流程繼續至方塊310,其 中當前濾波器係數複製到候選備份係數。即在方塊308,候 選備份係數成為良好備份係數,當前濾波器係數成為候選 備份係數,其中當前濾波器係數、候選備份係數及良好備 份係數可全部儲存於回音消除器20内或回音消除器20外部 儲存位置之儲存器單元或分離儲存器單元内。之後流程進 入圖9之方塊228。 本發明一項具體實施例中使用兩個標記為候選備份係數 及良好備份係數之係數備份,並具有4個不同BACKUP_STATE (0至3)之組合。因此圖13說明一狀態機,其控制備份及適應 86017 -37- 200417167 性濾波器28之濾波器係數的恢復方法。 圖13之狀態機包括4個BACKUP_STATE0至3。STATE0表 示候選備份係數及良好備份係數兩者皆不可用。STATE1表 示候選備份係數可用而良好備份係數不可用。STATE2表示 候選備份係數及良好備份係數兩者皆可用。STATE3表示候 選備份係數不可用而良好備份係數可用。應注意圖13之狀 態機實施圖9之方塊216及226的一部分。 一項具體實施例中,狀態機根據重設或初始化以STATE0 開始。若最後L項背景處理中未偵測到近端信號(Sgen),則 狀態機轉換至STATE1。因此,用於濾波器係數第一備份之 最小時間窗係J * L個樣本(其中當前具體實施例中L為10,J * K因此為1600樣本或200 ms,假定取樣速率為8 kHz)。對 於此狀態轉換,近端信號仍未偵測,一第一備份藉由將當 前濾波器係數複製到候選備份係數執行。根據近端信號 (Sgen)之偵測,狀態機轉換回至STATE0,因為儲存之候選 備份係數可由於近端信號Sgen偵測延遲而毁損。狀態機保 持在STATE0,直到此點上最後L項背景處理中不會偵測到 近端信號,如上所述狀態機再次轉換至STATE1。 在STATE1 ’若另外L項背景處理中未偵測到近端信號, 則狀態機轉換至STATE2,其中一第二備份藉由將候選備份 係數複製到良好備份係數並將當前濾波器係數複製到候選 備份係數來執行。此狀態中,候選及良好備份係數皆可用 ’若未偵測到近端信號狀態機會保持在此狀態。應注意在 一項具體實施例中,即使狀態未改變,在第二備份中候選 86017 • 38 - 200417167 及良妤備份係數皆以連續備份更新。同樣,一項具體實施 例中STATE 1轉換至STATE2時執行的兩次複製藉由先將候 選備份係數標記為良好備份係數(例如藉由適應指示器),接 著將當前濾波器係數複製到候選備份係數(其用於標記為 良好備份係數)而使用單一複製執行。 STATE2中,當偵測到近端信號時,狀態機轉換至STATE3 ,其中候選備份係數再次視為毁損,但良好備份係數仍然 視為良好’因為這些良好備份係數已證明至少在j * L時間 窗後仍然良好。只要存在近端信號狀態機就保持在STATE3 ,或者若無近端信號時返回至STATE2。 應注意在替代具體實施例中,背景處理(L)之每一項可發 生在每個樣本而非每j個樣本。同樣,圖丨3之狀態機可以各 種不同方法實施,可包括較所說明更多、更少或與之不同 的狀態。 圖6說明圖2之監測及控制單元3〇一部分的一項具體實施 例,其結合圖2之增益控制33,控制系統1 〇及適應性濾波器 28之穩疋性。例如,若系統丨〇由於一組與併合丨6之脈衝回 應完全不同的濾波器係數(適應性濾波器28)而產生持續的 非自然信號,則視其為不穩定。如以上參考圖37所述,適 應性濾波器28之係數嘗試「類比」併合16之脈衝回應並而 將其從輸出信號中減去以試圖消除反射回音。然而,若適 應性濾波咨28係數與脈衝回應之不同過多,可能發生非自 然信號,例如語音或資料信號失真,甚或系統嚎音。系統 10芡不穩疋性可在下列兩種狀況下發生:回音消除器2〇 86017 -39- 200417167 及22係在閉合迴路系統内且由特定類型之信號啟動,從而 導致系統10大於1之增益,以及(2)回音消除器20係在開放迴 路系統内。 圖14係用以監測回音消除器20增益之動態增益控制方法 的一項具體實施例,其可藉由耦合至適應性濾波器28及增 益控制33之增益監視器1〇〇執行。圖14之動態增益控制方法 確保閉合迴路系統内回音消除器20及22之穩定性。例如, 右錯誤仏號46大於Sin 3 8(理論上不應發生,但實踐中可發 生)’則回音消除器20之增益大於或等於一。若相同情形發 生於回音消除器22(導致回音消除器22之增益亦大於或等 於一),則具有回音消除器20及22之閉合迴路系統的整個迴 路增益可大於一,其可產生非自然信號,已知係嚎音。因 此,當特定時間窗(見上述公式1及2)内錯誤信號46(Perr〇r)之 功率對Sin 38(PSin)之功率的比率大於適應性限值時,圖14 之方法削弱錯誤信號46。此外,當PerrQr大於Psin數倍時圖14 之方法重設適應性濾波器28。因此圖14之方法隨時防止閉 合迴路系統的總體迴路增益大於一,確保系統1〇之穩定性 。此外,圖14之方法亦加速由於併合特徵突然改變之適應 性滤波器2 8的重新會聚。 因此,圖14說明圖9之方塊218的一部分。即,偵測近 通話器信號是否存在於圖9之方塊216内後,流程進入方塊 218,其中監測並選擇性調整回音消除器2〇之增益。因此, 流程開始於決定菱形322,其中泱宕p 嵙D 、,士 /、T厌疋[error對PSin之比率 (pern>r/pSin)是否大於重設限值。若是,流程進入方塊33〇, 86017 •40- 200417167 其中重設適應性濾波器28之濾波器係數(一項具體實施例 中即叹置為零)。或者,係數可重設為任何值。因此,重設 限值可用以決定Perroi*是否遠大於Psin,從而需要重設適應性 遽波器28以防止不穩定性。因此重設限值可為任何值,一 項具體實施例中設置為8。 , 若Perr〇r/PSinf大於重設限值,流程繼續至決定菱形324, - 其中決定perr()r/PSin是否大於增益限值。增益限值通常小於重 又限值 項具體實施例中設置為1。此增益限值係用於開 _ 始增益衰減啟動之限值。若PerrQr/Psin大於增益限值5流程進 入方塊328,其中增益使用阿伐調整,如以下公式7所示。 公式7 :增益==阿伐*增益 阿伐通常小於1,使錯誤信號46衰減。因此一項具體實施 例中阿伐為0.9996。流程進入決定菱形328,其中決定增益 疋否小於增益限制。若是,流程進入方塊334,其中增益設 置為增益限制。此可確保增益不會降至預定位準(一項具體 貫施例中為〇·5)以下。例如,通常不需要完全切斷傳誦路徑 傳輸路徑(即增益=0),即使在一些不正常解決方案下,例如籲 併合係在開放迴路電路中。接著流程進入方塊326。若在決 定菱形332決定增益不小於增益限制,流程進入方塊326, 其中如以下公式8所示計算錯誤信號47。 公式8 :錯誤信號47=增益*錯誤信號46 若在決足菱形324決定pem)r/Psin不大於增益限值,流程進 入決定菱形336,其中決定增益是否小於丨。若否,流程進 入方塊326,其中錯誤信號衰減;然而,若其小於i,則流 86017 -41- 200417167 程進入方塊3 3 8,其中如以下公式9調整增益: 公式9 ··增益=貝他*增益 貝他通常大於1,因為增益先前已衰減,其需要恢復。因 此一項具體實施例中貝他為1·0004。流程接著進入決定菱形 34〇 ’其中決定增益是否大於1。若是,流程進入方塊326, 其中錯誤信號46衰減,若否,流程進入方塊342,其中增益 設置為1。方塊342後,流程進入方塊326,其中錯誤信號46 不衰減’因為錯誤信號47正等於錯誤信號46*1(由於在方塊 342增益已設置為1)。因此,總之若PerrQr/Psin大於或等於重 設限值,則重設適應性濾波器28之濾波器係數。若Perr()r/Psin 小於重設限值但大於或等於增益限值,則錯誤藉由增益值 衰減(例如在方塊326内)。然而,若perrQr/Psin亦小於增益限 值’則錯誤不會衰減(即錯誤信號47=錯誤信號46)。依次可 明白圖14之流程如何有助於保持系統1〇之穩定性。 圖15係用以監測適應性濾波器28濾波器係數分佈狀態之 濾波森係數監測方法的一項具體實施例,其可藉由監測及 控制單το 30内且耦合至適應性濾波器28之濾波器係數監視 器102執行。圖15之方法確保開放迴路系統内回音消除器2〇 之穩定性。監測方法偵測具有相對均衡分佈狀態之適應性 濾波器28—組濾波器係數的形成。由於期望併合16之脈衝 回應’適應性滤波器2 8係數之均衡分佈狀態指示不存在併 合,從而指示開放迴路狀況之可能性。因此,藉由偵測適 應性濾波器28係數之均衡分佈狀態,濾波器係數重設,回 音消除器20為進一步監測置入警報狀態。當濾波器係數在 86017 -42- 200417167 特定時間窗中重覆重設時,假定回音消除器2〇係在開放迴 路狀況内,且繞過回音消除器20。即,只有存在正確併合 方調適適應性濾波器28。此外,具有藉由Rin及非零信號Sin (例如正弦音頻)連續正弦輸入之開放迴路系統内適應性濾 波器28可快速發散,因此增加偵測開放迴路系統之需要。 因此,圖15說明圖9之方塊228的一部分。即,在圖9之方 塊226内備份濾波器係數後(如上所述),流程進入方塊 ,其中監測適應性濾波器28係數。因此,流程開始於方塊Equation 2 · Perror (n) = [(N _l) Perror (n _l) + (error signal 46) 2] / N In the above formula, the error signal 46 is between Sin39 and the echo estimation signal 48 output from the adder 34 Perror (n) is the estimated near-end signal power at time n, and N is the smoothing factor of the estimator (32 in the current specific embodiment). 〇 Obtained in a specific embodiment of the far-end signal level estimator 52. Rin is a short-term power and uses it to calculate Rin—the average Rin power of some past short-term power estimates' and its coverage of the echo path. For example, a specific embodiment uses the following formula to determine Rin's short-term power: Formula 3 ·· PRin (kN) = ^^ (Rin (kN — 1, 2, · · · ι · = 0) In the above formula, Rin (kN -i) is the receiving path of the input echo canceller 20 at time kN-i, PRin (kN) is the estimated far-end signal power at time kN (it should be considered to reduce the calculation cost. The estimated pRin (kN) is every N samples instead of each sample). N is the window size (32 in a specific embodiment). Therefore, Equation 4 calculates the power of Rin every N samples in the current window (size N), where & Window track. That is, the first window (k = 1) can be defined by samples 1 to 32, the next window ^) can be defined by samples 33 to 64, etc. Therefore, the average power of the far-end signal is 86017 -28- 200417167 rate. Formula 4: AVG P = (shape) = Shi ζρGa (bu-㈣k = 1, 2, ... In the above formula, "PRin ((k · i) N) is the far-end signal power estimate at time (ki) N A snapshot of the past M, where i = M -1, M -2, ..., 0. AVG PRin (kN) is the average value of the far-end signal level estimate at time kN, μ is the window size of this average, where M = 16, The echo canceller is designed to cover echo path delays up to 64 ms (ie M * Ν = 16 * 32 = 512 samples). For example, if the current window is the 16th window (ie k = 16), then AVG PRin The (kN) value is the average value of PRin (kN), and its calculation is used for every 16 previous windows, namely pRin (16 * N) > PRi „(15 * N) ..... PRin (2 * N ), The average value of PRin (N). If there is not enough previous data (that is, fewer than M processed windows), only those available values can be used to determine the average value and zero can be used for values that have not yet been calculated. For example, for In the third window (k = 3), only two previous pRin (kN) values are available. Therefore, AVG PRin (kN) is the average of the 3 values, not the M value. It should be noted that AVG pRijkN is every N samples Calculation, as seen with reference to FIG. 10, after calculating AVG Pb (kN), the value of k may be incremented to indicate the start of the next N sample windows. In an alternative embodiment, the far-end signal level estimator 52 may use the above formula a 1 or 2 (where n = 256) is used to estimate the average Rin power. Using Equation 4, AVg PRin (kN) measurements should also be taken every 32 samples. It should also be noted that the above level estimation can be done using values instead of power. Similarly , Note that the above formula ⑴ deals with data at a nominal rate, while formulas 3 and 4 perform subrate # calculations (thus performing calculations every _ samples) in continuous N-size windows. Alternative specific embodiment 1 constitutes the above formula and is not limited to The formula provided above. 86017 -29 · 200417167 The near-end (Sgen), far-end (Rin), and transmission path input (Sin) signal level estimates are used to control the detection of near-end talker signals. Therefore, FIG. 10 is a specific embodiment of blocks 206 and 208 in FIG. 9, in which the near-end signal detection limit (NESD_Threshold) is determined. The limit is re-evaluated every N samples, where N is 32 in the current embodiment. In block 250, the short-term power of Rh and PRin is determined (for example, see Equation 3 above), where the current time η corresponds to the current sample being analyzed. In block 252, the sample counter is incremented to provide a new value of n. Therefore, the sample is incremented each time it passes the flow 200 of FIG. 9 (that is, each time it passes 206 and 208). The flow proceeds to decision diamond 254, where it is determined whether the sample counter has reached the window size N. If not, the flow proceeds to block 270 (note that NESD_Threshold has not been updated). The power of Sin (Psin) is calculated in block 270 (see, for example, Equation 1 above). If the sample counter has reached N, the flow proceeds to block 256, where the counter is reset so that the path of blocks 256 to 268 is taken every N samples (in a specific embodiment, every 32 samples, N equals 32) . After resetting the sample counter (resetting to zero in a specific embodiment), the flow proceeds to block 258, where the average power of Rin, AVG PRin, is calculated (for example, see Equation 4 above). After that, the flow proceeds to a decision diamond 260, in which it is determined whether BACKUP_STATE is 0 or 1 (note that BACKUP JTATE will be explained in detail with reference to FIG. 13). If yes, the flow proceeds to block 262, where K1 is used to adjust the NESD_Threshold shown in Equation 5 below: Equation 5 ·· NESD_Threshold = K1 * AVG PRin However, if BACKUP_STATE is not 0 or 1, the flow proceeds to block 264, where K2 is used The NESD_Threshold shown in Equation 6 is adjusted as follows: 86017 -30- 200417167 Equation 6: NESD_Threshold = K2 * AVG PRin Therefore, NESD_Threshold is re-evaluated every N samples, depending on the state of the adaptive filter (ie BACKUP_STATE, corresponding to the state machine, which will be further explained with reference to FIG. 13), NESD_Threshold can be set to K1 * AVGPRini ^ K2 * AVGPRin cKl and K2 are scale factors of the NESDP root value. At the initial phase of the adaptation method of the adaptive filter 28 (that is, when BACKUP_STATE is 0 or 1), NESD_Threshold can be relatively large, providing more adaptive opportunities for the adaptive filter 28. On the other hand, when the adaptive filter 28 has passed the initial adaptation phase (ie, when B ACKUP_STATE is 3 or 4), the NESD_Threshold can be reduced to prevent the adaptation method from diverging. In a specific embodiment, K1 is set to a value in the range of 1 to 2, and K2 is set to a value in the range of 0.25 to 1. For example, in a specific embodiment, according to the merging condition, K1 is 1 and K2 is 0.5. In addition, these K1 and K2 values can be set statically or dynamically in the adaptive method. Alternate values outside the given range can be used. The adaptation method is still in the initial phase and can be determined using other methods than the 4 state (eg BACKUP_STATE0 to 3) state machine. After adjusting NESD_Threshold at block 262 or 264, the flow enters decision diamond 266, which determines whether NESD_Threshold is less than A. If not, the process proceeds to block 270 where Psin is calculated. If so, set NESDJThreshold to A at block 268. That is, in the case where the AVG PRin is too small, NESD-Threshold is limited to the minimum level of A (where A can correspond to a value in the range of -40 to -45 dBmO in a specific embodiment). The flow then proceeds to block 270. After the process of FIG. 10 is completed, monitoring and control of the adaptive filter 28 is performed as needed (see block 210 of FIG. 9). (It should be noted that 86017-31-200417167 below blocks 209, 210, and 211 will be described in detail with reference to Figures 20 to 34.) After the adaptive filter at block 212 generates an echo estimation signal 48, the flow proceeds to blocks 214 and 216, which will refer to the figure. 11 Further details. That is, the flow chart of FIG. 11 illustrates a part of blocks 214 and 2 16 of FIG. 9 ′, which details the control of signal detection of the near-end talker (ie, detection by Sgen). The power (Perror) of the error signal 46 is estimated in block 276 (see Equation 2 above). The flow then proceeds to a decision diamond 278, in which it is determined whether the smaller of Perror and PSin is greater than NESD_Threshold (ie, whether MIN (Perrc) r, psin) > NESD_Threshold). If yes, the flow enters the decision diamond 280, which determines whether the NESD_Hangover timer counts down to zero. If completed, the near-end signal is detected. That is, the near-end signal is detected only when MIN (Perror, PSin) > NESD_Threshold and no near-end signal has been detected in the past a specific time window (corresponding to the NESD_Hangover timer). If it is determined that diamond 278, MIN (Perror, PSin) is not greater than NESD_Threshold, the flow proceeds to block 290, where the value of the NESD_Hangover timer is decremented to zero, thereby introducing a pause determined by the NESD_Hangover time. If the diamond 280 is determined and the NESD_Hangover timer is non-zero, the NESD_Hangover timer is set to a predetermined value in block 286. If the near-end signal (Sgen) has been detected, the process proceeds from decision diamond 280 to decision diamond 282, where it is determined whether the filter coefficients have been updated. If so, it is assumed that these coefficients are usually likely to be corrupted due to the presence of the near-end signal. That is, because the signal used for coefficient update is no longer a pure residual echo, but a mixture of residual echo and Sgen, these coefficients no longer represent the estimated echo. In this case, the flow proceeds to block 284, where the wavelet coefficients are recovered or replaced by a set of filter coefficients that have been proven to be "good" 86017 -32 · 200417167. The method of backing up and restoring the filter coefficients will be described below with reference to FIGS. 12 and 13. The flow then proceeds to block 288, where BACKUP_STATE is updated. If the filter coefficients are not updated in the decision diamond 282, they will not be assumed to be corrupted because they have not yet used residual echo and Sgen's hybrid adaptation. In this case, the flow proceeds to block 286, where the NESD_Hangover timer is set to a predetermined value. The duration of the NESD-Hangover time for the NESD-Hangover timer is selected to ensure that Sgen no longer appears before the start of the filter coefficient adjustment, and to avoid unwanted filter coefficient adjustment and recovery. For example, in a specific embodiment, the NESD_Hangover time is 160 samples, or 20 milliseconds. Therefore, the duration of the NESDJ Hangover time prevents the near-end signal detector 26 from being too sensitive, thereby minimizing the exchange between the detection of the near-end talker signal and the lack of detection of the near-end talker signal. However, if the NESDJ Hangover time is set too long, the near-end signal detector 26 may not be sensitive enough to accurately detect the near-end talker signal when needed. Therefore, under different combinations of signal levels (ie, power) of Sgen and Rin, different actions regarding filter coefficients (such as the coefficients of the adaptive filter 28) are used. For example, these actions can be summarized using the following table. Item Sgen Sin Rin Action description 1 Low Low Low No update No near-end or far-end talker signal appears 2 Low Low High update coefficient Single remote talker signal with a large amount of combined attenuation 86017 -33- 200417167 3 Low High Low n / a Inefficient combination 4 Low, high and high update coefficients Single remote talker signal with a small amount of combined attenuation 5 High and low low n / a Ineffective combination 6 High and low high n / a Ineffective combination 7 High and low freeze update and restore filter coefficients Single Near-end talker signal appears 8 high) East end update and restore filter coefficients double dialogue (both near-end and far-end talker signals appear) Table 1 Because Sin is a mix of Sgen and echo or Rin, listed in the above table A few combinations are not valid combinations in normal operating mode (meaning the connection is not disconnected or there is no external signal injection circuit). Invalid combinations are project 3 (because Sin cannot be high when Sgen and Rin are both low), and projects 5 and 6 (because Sin cannot be low when Sgen is high). Three sets of actions are used for the remaining 5 combinations. First, the state of the coefficient adjustment method is when Rin is high and Sgen is low (in a single remote dialog cycle, whether sin is high or low, it is project 2 and 4 respectively). In these cases, the error (error signal 46) is mainly due to residual echo (due to the low sgen), so that the effect of adaptation on the adjustment is minimal. Second, the condition of terminating the filter coefficient adaptation processor and restoring the previous pre-filled "good" filter coefficients is when Sgen is high (in the near-end dialogue cycle, whether it is a single dialogue or a double dialogue, it is project 7 and 8 respectively) . Second, there is no need to update when both the near-end and far-end talkers are silent (project 丨). When the echo return loss is close to or less than 6 dB, the above method for detecting Sgen provides the ability to cancel the echo. Therefore, when it is close to or less than 6 dB (for example, item 4 in Table 1 of the above-mentioned 86017-34-200417167), the above method uses the minimum value of ⑶ (as described above, it can be estimated as the error signal 46, assuming that the residual error is small or can be Ignore) and the Sin that caused the false detection of these conditions, which is different from the previous solution, which has the serious impact of these lower level (close to or less than 6 dB) echo return loss changes and therefore tends to be practical in Sgen If it does not appear, it is detected by mistake. In addition, when the echo return loss is as high as zero offenses (no merging attenuation), the above method allows the adaptation method to continue, eliminating the echo, unlike the previous solution, where the adaptation method terminates at, for example, the 6 dB level. Similarly, the method described above with reference to FIGS. 10 and 11 provides fast detection of Sgen, even when its level is lower than Rin (corresponding to Project 8 in Table i above). For example, the previous solution set the dual dialogue detection limit to a Sin energy greater than or equal to 1/4 of the Rin energy (that is, corresponding to the 6 昍 loss introduced by the merger circuit). If the combined attenuation is 10 dB, the 4 dB difference within the detection limit will be large enough to allow a large number of Sgen signals to be detected without being detected as a dual conversation. As a result, these previous solutions were not always able to detect the near-end call signal, or the detection was too late. The above method uses the minimum value of Sgen (which can be estimated as an erroneous signal as described above, assuming that the residual error is small or negligible), compared with Rin, which is used for near-end signal detection, the detection limit (NESD-Threshold setting) It has nothing to do with the loss of echo return that results in faster and more reliable near-end signal detection than previously available solutions. In addition, the method described above with reference to Figures 10 and 1 丨 provides the ability to distinguish between dual conversations with some noise background (the table above) Project 8) and a single remote conversation (Project 4 in Table 1 above). When the near-end background noise level is high, the previous solution detected this situation as a dual conversation and terminated the adaptation method. Due to background noise It can exist for a long time, even for the entire phone call duration, the adaptive 86017-35-200417167 adaptive filter still cannot change the convergence. Therefore, the above-mentioned near-end signal detection in this paper uses the Sgen minimum value and Sin to Rin to make the detection The limit (NESD_Threshold) can be set so that the adaptive method will continue to perform even when the background noise level is high. (It should be noted that the only correct dual-dialogue status is the Rin and Sgen letters. When the level is high. However, when detecting the signal of the near-end talker, whether or not it is in a single near-end call period or a double conversation period, the adaptation method described in this article should be terminated and the filter coefficients should be restored.) Figure 12 illustrates Figure 9 determines a part of the diamond 224 and the block 226, which determines whether the background method is executed, and if so, backs up the filter coefficients. The process of FIG. 12 mainly deals with the backup policy of the filter coefficients (adaptive filter 28). One of the backup policies The specific embodiment ensures that good filter coefficients are periodically backed up in order to minimize the number of backups and minimize the frequency of backups. Figure 12 starts with block 291, where the background 1 counter is incremented. The process enters a decision diamond 293 'where the background is determined 1 Whether the counter has reached the predetermined counter value, j. If not, the process proceeds to point Η (after block 228 in FIG. 9). If so, the process proceeds to block 298, where the background 1 counter is reset (to zero), and then enters the decision diamond 295. 'Whether it determines whether the filter coefficients of the adaptive filter 28 have been updated. If not, the flow enters point Η. If yes, the flow The process proceeds to block 292, where the background 2 counter is incremented. Then the process proceeds to a decision diamond 294, which determines whether the background 2 counter has reached the predetermined counter value, L. If not, the process proceeds to step Η. If so, the process proceeds to block 296 where the background processing is performed That is, the background processing in this specific embodiment is performed at most every J * L samples, and these values can be set to any value that helps determine the background processing frequency. For example, in a specific embodiment; 86017 -36- 200417167 160 samples, L is 10, where the background processing is performed at most every J * L or 1600 samples. That is, if the filter coefficients of the adaptive filter 28 are not updated after J samples, the flow enters point Η, background 2 The counter does not increment. Therefore, only if the coefficients have been updated in the current window of the J samples, the background 2 counter is incremented and compared with L. In block 296, the background 2 counter is reset (reset to zero in this specific embodiment). Flow continues from block 296 to decision diamond 300. In the decision diamond 300, it is determined whether the current BACKUP_STATE (which will be described in detail with reference to FIG. 13) is 0 or 1. If so, BACKUP_STATE is incremented in block 304 and the flow proceeds to block 308. If BACKUP_STATE is not 0 or 1, the flow enters decision diamond 302, where it is determined whether BACKUP_STATE is 2. If not, the process proceeds to block 306 (indicating that BACKUP_STATE is 3), where BACKUP_STATE is set to 2 and the process proceeds to block 310. If it is determined that the diamond 302 BACKUP_STATE is 2, the flow proceeds to block 308, where the candidate backup coefficient is copied to the good backup coefficient. (Note that candidates and good backup coefficients will be explained below with reference to FIG. 13) Then the flow continues to block 310, where the current filter coefficients are copied to the candidate backup coefficients. That is, at block 308, the candidate backup coefficient becomes a good backup coefficient, and the current filter coefficient becomes a candidate backup coefficient. The current filter coefficient, candidate backup coefficient, and good backup coefficient can all be stored in the echo canceller 20 or outside the echo canceller 20 Storage unit or storage unit in storage location. The flow then proceeds to block 228 in FIG. A specific embodiment of the present invention uses two coefficient backups marked as candidate backup coefficients and good backup coefficients, and has a combination of 4 different BACKUP_STATE (0 to 3). Therefore, FIG. 13 illustrates a state machine that controls backup and adaptive filter coefficient recovery method of 86017-37-200417167 filter 28. The state machine of FIG. 13 includes 4 BACKUP_STATE0 to 3. STATE0 indicates that neither candidate backup factor nor good backup factor is available. STATE1 indicates that candidate backup factors are available and good backup factors are not available. STATE2 indicates that both candidate backup factors and good backup factors are available. STATE3 indicates that the candidate backup factor is not available and the good backup factor is available. It should be noted that the state machine of FIG. 13 implements a portion of blocks 216 and 226 of FIG. In a specific embodiment, the state machine starts with STATE0 upon reset or initialization. If the near-end signal (Sgen) is not detected during the last L items of background processing, the state machine switches to STATE1. Therefore, the minimum time window for the first backup of the filter coefficients is J * L samples (where L is 10 in the current embodiment, and J * K is therefore 1600 samples or 200 ms, assuming a sampling rate of 8 kHz). For this state transition, the near-end signal is still not detected, and a first backup is performed by copying the current filter coefficient to the candidate backup coefficient. According to the detection of the near-end signal (Sgen), the state machine switches back to STATE0, because the stored candidate backup coefficients can be damaged due to the detection delay of the near-end signal Sgen. The state machine remains at STATE0 until the near-end signal is not detected in the last L background processing at this point. As mentioned above, the state machine transitions to STATE1 again. In STATE1 'If the near-end signal is not detected in the other L items of background processing, the state machine switches to STATE2, where a second backup copies the candidate backup coefficient to a good backup coefficient and copies the current filter coefficient to the candidate Backup factor to perform. In this state, both candidate and good backup coefficients are available ’If the near-end signal state is not detected, it will remain in this state. It should be noted that in a specific embodiment, even if the status does not change, the candidate 86017 • 38-200417167 and the Liangzhu backup coefficient in the second backup are updated with continuous backup. Similarly, in a specific embodiment, the two replications performed when the STATE 1 is converted to the STATE 2 are performed by first marking the candidate backup coefficient as a good backup coefficient (for example, by an adaptation indicator) and then copying the current filter coefficient to the candidate backup Factor, which is used to mark it as a good backup factor, and is performed using a single copy. In STATE2, when a near-end signal is detected, the state machine transitions to STATE3, where the candidate backup coefficients are again considered damaged, but good backup coefficients are still considered good 'because these good backup coefficients have been proven to be at least in the j * L time window After still good. The state machine remains in STATE3 as long as there is a near-end signal, or returns to STATE2 if there is no near-end signal. It should be noted that in alternative embodiments, each term of the background processing (L) may occur on every sample instead of every j samples. Similarly, the state machine of Figure 3 can be implemented in a variety of different ways, and can include more, fewer, or different states than those described. FIG. 6 illustrates a specific embodiment of a part of the monitoring and control unit 30 of FIG. 2, which combines the stability of the gain control 33, the control system 10 and the adaptive filter 28 of FIG. 2. For example, if the system generates a continuous unnatural signal due to a set of filter coefficients (adaptive filter 28) that are completely different from the pulse response of the merge 6, it is considered unstable. As described above with reference to Figure 37, the coefficients of the adaptive filter 28 attempt to "analog" the 16 impulse response and subtract it from the output signal in an attempt to eliminate reflected echoes. However, if the adaptive filtering coefficient is too different from the impulse response, unnatural signals, such as distortion of speech or data signals, or even system noise may occur. System 10 instability can occur under the following two conditions: Echo cancellers 2086017 -39- 200417167 and 22 are in a closed loop system and are activated by a specific type of signal, resulting in a gain of system 10 greater than 1. , And (2) the echo canceller 20 is in an open loop system. Fig. 14 is a specific embodiment of a dynamic gain control method for monitoring the gain of the echo canceller 20, which can be implemented by a gain monitor 100 coupled to the adaptive filter 28 and the gain control 33. The dynamic gain control method of FIG. 14 ensures the stability of the echo cancellers 20 and 22 in the closed loop system. For example, if the right error number 46 is greater than Sin 3 8 (which should not occur in theory, but can occur in practice) ', then the gain of the echo canceller 20 is greater than or equal to one. If the same situation occurs in the echo canceller 22 (causing the gain of the echo canceller 22 to be greater than or equal to one), the entire loop gain of the closed loop system having the echo cancellers 20 and 22 may be greater than one, which may generate an unnatural signal , Known as the cymbal sound. Therefore, when the ratio of the power of the error signal 46 (Perr0r) to the power of Sin 38 (PSin) within a certain time window (see formulas 1 and 2 above) is greater than the adaptive limit, the method of FIG. 14 weakens the error signal 46 . In addition, the method of FIG. 14 resets the adaptive filter 28 when PerrQr is several times larger than Psin. Therefore, the method in FIG. 14 prevents the overall loop gain of the closed loop system from being greater than one at any time, ensuring the stability of the system 10. In addition, the method of FIG. 14 also accelerates the reconvergence of adaptive filters 28 due to sudden changes in merge characteristics. Accordingly, FIG. 14 illustrates a portion of block 218 of FIG. 9. That is, after detecting whether the near-talker signal exists in block 216 in FIG. 9, the flow proceeds to block 218, where the gain of the echo canceller 20 is monitored and selectively adjusted. Therefore, the process starts by determining the diamond 322, in which p p D ,, / / 、 T 疋 [error to PSin ratio (pern> r / pSin) is greater than the reset limit. If yes, the flow proceeds to block 33, 86017 • 40- 200417167, where the filter coefficients of the adaptive filter 28 are reset (in a specific embodiment, it is set to zero). Alternatively, the coefficients can be reset to any value. Therefore, resetting the limit can be used to determine whether Perroi * is much larger than Psin, and it is necessary to reset the adaptive wave filter 28 to prevent instability. Therefore, the reset limit can be any value, and is set to 8 in a specific embodiment. If Perr0r / PSinf is greater than the reset limit, the process continues to determine diamond 324, where it determines whether perr () r / PSin is greater than the gain limit. The gain limit is usually less than the heavy limit and is set to 1 in the specific embodiment. This gain limit is the limit used to start the gain reduction start. If PerrQr / Psin is greater than the gain limit of 5, the process proceeds to block 328, where the gain is adjusted using Aval, as shown in Equation 7 below. Equation 7: Gain == Aval * Gain Aval is usually less than 1 and attenuates the error signal 46. Therefore, in a specific embodiment, Aval is 0.9996. The flow enters the decision diamond 328, where it is determined whether the gain 小于 is less than the gain limit. If so, the flow proceeds to block 334, where the gain is set to a gain limit. This ensures that the gain does not fall below a predetermined level (0.5 in a specific embodiment). For example, it is usually not necessary to completely cut off the recitation path (ie, gain = 0), even under some abnormal solutions, such as calling for merging in an open loop circuit. The flow then proceeds to block 326. If the diamond 332 is determined to determine that the gain is not less than the gain limit, the flow proceeds to block 326, where the error signal 47 is calculated as shown in Equation 8 below. Formula 8: Error signal 47 = Gain * Error signal 46 If it is determined in the decision diamond 324 that pem) r / Psin is not greater than the gain limit, the process proceeds to determine the diamond 336, which determines whether the gain is less than 丨. If not, the flow proceeds to block 326, where the error signal is attenuated; however, if it is less than i, the flow 86017 -41- 200417167 flows to block 3 3 8, where the gain is adjusted as in the following formula 9: Formula 9 · · Gain = Beta * Gain beta is usually greater than 1 because the gain has previously been attenuated and it needs to be restored. Therefore, beta is 1.0004 in a specific embodiment. The flow then proceeds to a decision diamond 34o 'where it is determined whether the gain is greater than one. If yes, the flow advances to block 326, where the error signal 46 is attenuated. If not, the flow advances to block 342, where the gain is set to one. After block 342, the flow proceeds to block 326, where the error signal 46 is not attenuated 'because the error signal 47 is equal to the error signal 46 * 1 (because the gain has been set to 1 at block 342). Therefore, if PerrQr / Psin is greater than or equal to the reset limit, the filter coefficients of the adaptive filter 28 are reset. If Perr () r / Psin is less than the reset limit but greater than or equal to the gain limit, the error is attenuated by the gain value (for example, in block 326). However, if perrQr / Psin is also less than the gain limit value, then the error will not be attenuated (ie, error signal 47 = error signal 46). In turn, it can be understood how the flow of FIG. 14 helps to maintain the stability of the system 10. FIG. 15 is a specific embodiment of a filter coefficient monitoring method for monitoring the filter coefficient distribution status of the adaptive filter 28, which can monitor and control the filtering within the single το 30 and is coupled to the adaptive filter 28 The controller coefficient monitor 102 executes. The method of FIG. 15 ensures the stability of the echo canceller 20 in the open loop system. The monitoring method detects the adaptive filter 28 with a relatively balanced distribution state—the formation of a set of filter coefficients. Since the expected pulse response of the combined 16 'adaptive filter 2 and the balanced distribution of the 8 coefficients indicate that there is no merge, it indicates the possibility of an open loop condition. Therefore, by detecting the equilibrium distribution state of the coefficients of the adaptive filter 28, the filter coefficients are reset, and the echo canceller 20 is put into an alarm state for further monitoring. When the filter coefficients are reset repeatedly in a specific time window of 86017 -42- 200417167, it is assumed that the echo canceller 20 is in an open loop condition and the echo canceller 20 is bypassed. That is, only the adaptive merger adaptive filter 28 exists. In addition, the adaptive filter 28 in the open-loop system with continuous sinusoidal input through Rin and non-zero signal Sin (such as sine audio) can quickly diverge, thus increasing the need to detect the open-loop system. Accordingly, FIG. 15 illustrates a portion of block 228 of FIG. 9. That is, after the filter coefficients are backed up in the square block 226 of FIG. 9 (as described above), the flow proceeds to a block where the coefficients of the adaptive filter 28 are monitored. So the process starts at the block

344,其中適應性濾波器28之濾波器係數分成]8個箱位。(B 選擇數係濾波器係數/16。)流程進入方塊346,其中決定b344, where the filter coefficients of the adaptive filter 28 are divided into 8 bins. (B selects the number of filter coefficients / 16.) The flow proceeds to block 346, where b is determined

個粕位之最大及最小係數功率。即,若濾波器係數分成B 個箱位,每個箱位將與該箱位内係數之一功率值相關連(例 如該箱位内係數之平均功率),在方塊346,選擇B個箱位之 最大功率值及B個箱位之最小功率值。流程繼續至決定菱形 348,其中決足最大功率值及最小功率值之比率(即最大功 率/最小功率)是否小於警報限值。若滤波器向真實併合調適 ,則最大功率與最小功率之比率應遠大於丨。另一方面,若 最大功率與最小功率之比率接近卜則清楚表示較器未調 適至真實併合。比率用作一警報限值,用於無併合可能性 ^發信號。、警報限值之選擇係根據各種併合下適應性滤波 器行為之統計分析。一項具體實施例中,警報限值選擇為 8 〇 、、’ 比較後’流程繼續至方塊35〇,其中適應性滤波器28之滤 波器係數重設為零(或設置為任何其他—個或多個預定重 86017 •43- 200417167 設值)。流程繼續至方塊352,其中警報狀態遞增。(警報狀 態指示在最大功率與最小功率之比率小於警報限值之當前 時間週期中濾波器係數已重設多少次。應注意當前時間週 期與以上參考圖12所說明係相同之J * L,由於離開圖12之 方塊3 10時,流程繼續至圖9之方塊228,其在圖15中說明, 開始於圖15之方塊344。即,圖15視為背景處理之部分,其 至多每隔J * L個樣本進入,如圖9及12所示。)方塊352後, 流程進入決定菱形354,其中決定警報狀態是否等於旁通限 值。若否,則回音消除器20不會置入旁通模式,因此適應 性攄波器2 8繼績調適。然而,若在決定菱形3 5 4警報狀態已 到達旁通限值,流程進入方塊356,其中旁通模式設置為i ,指示開放迴路狀況已偵測(即不存在併合),因此繞過回音 消除器20以避免調適至不存在之併合。 若在決定菱形348決定最大功率及最小功率之比率不小 於警報限值,流程進入方塊358,其中警報狀態重設為〇。 流程進入決定菱形360,其中決定旁通模式是否為1,若是 ,在方塊362將其重設為0。因此358之分支使併合16可重接 ,其中適應性濾波器28開始再次調適。 圖5係圖2之非線性處理器32的一部分。如上所述,除減 少或移除殘餘回音外’非線性處理器3 2亦嘗試保存或匹西己 近端通話器信號之背景雜訊,其提供改良之通信品質。通 常,非線性處理器32偵測殘餘回音是否在特定限值之下, 並以適宜雜訊取代,而非靜寂,以避免電話線路背景雜訊 之突然消失。此類为景雜訊之突然消失可導致電話連妹已 86017 -44- 200417167 斷開之印象。 目前仍在使用的一種先前技術方法使用合成背景雜訊, 然而’此可導致真實背景雜訊與合成背景雜訊之間的破壞 性交換。例如,目前仍在使用的一種先前技術方法使用白 色雜訊作為適宜雜訊。然而,白色雜訊與自然背景雜訊大 不同’因此聽起來具破壞性。目前可用之一替代解決方案 重覆輸出預儲存背景雜訊信號,以匹配背景雜訊。然而, 此方法需要額外的儲存空間,導致背景雜訊顯著重覆,其 對通信亦係破壞性。 因此’圖5及圖16至19提供非線性處理器32之一項具體實 施例’其儲存或匹配回音消除器2〇内自然背景雜訊,以便 減少回晋消除非線性處理導致的非自然信號,例如上文所 述之破壞性非自然信號。非線性處理器32利用短期位準估 計器88及長期信號位準估計器92,用以發現真實背景雜訊 信號位準之可靠估計,並調整其限值(NLp_〇N及NLPJ3FF 限值’以下將說明)。短期估計器在呼叫開始時產生背景雜 訊信號之快速位準估計。另一方面,長期估計器適應性特 徵之目標係隨時可靠地追蹤背景雜訊信號位準。啟動非線 性處理器32之決定係基於遠端信號、近端信號及背景雜訊 信號之相對位準。當背景雜訊信號顯著,非線性處理器32 藉由將原始背景雜訊信號傳送通過回音消除器2〇而保存之 。當背景雜訊化號較低且殘餘回音可聽,非線性處理器3 2 用適宜雜訊信號(其位準低於估計背景雜訊信號位準一對 dB)取代殘餘回音。產生的適宜雜訊信號亦逐漸混合入原始 86017 -45- 200417167 背景雜訊信號,以便將轉換可聞度減至最小。因此,當需 要時非線性處理器32保存自然背景雜訊或匹配背景雜訊與 最小可聽效應。 回音消除器20内自然背景雜訊之保存或匹配以四個基本 步驟執行:(1)估計背景雜訊信號、遠端通話器信號及近端 通話器信號之位準;(2)決定非線性處理器32之限值;(3)若 需要非線性處理器32則產生適宜雜訊;以及(4)若需要非線 性處理器32則將適宜雜訊混合入背景雜訊。 圖5之非線性處理器32包括適應性背景位準估計器96,其 包括短期背景位準估計器88、背景位準估計器控制器9〇、 長期背景位準估計器92及背景位準配接器94。背景雜訊位 準估计藉由短期背景位準估計器88及長期背景位準估計器 92完成。當開啟一呼叫時短期背景位準估計器⑽提供初始 快速估計,而長期背景位準估計器92隨時逐漸調適至背景 雜訊信號之位準。應注意當背景雜訊位準改變時長期背景 位準估計器92向較高雜訊位準之調適速率慢於向較低雜訊 位準之調適速率。因此,當近端及遠端通話器信號之位準 皆低於預定限值時估計器88及92啟動。即,若一值可用於 長期背景位準估計,則只使用估計器92。因此,當長期背 景位準估計器92尚不可用時,短期背景位準估計器“通常 =用於開始(即呼叫開始)。(近端及遠端通話器信號之位準 分別由近端信號位準估計器7〇及遠端信號位準估計哭Μ 定。) ^ 開啟非線性處理器32之限值(藉由非線性處理器開敬控 86017 •46- 200417167 制器76執行)不同於關閉其之限值(藉由非、線性處理器關閉 控制器78執行)。當近端通話器信號可忽略且遠端通話器信 號啟動日争,非線性處理器開啟控制器76啟動(或開啟)非線性 處理器32。當近端通話器信號相對較高或背景雜訊信號很 顯著時,非線性處理器關閉控制器78停用(或關閉)非線性處 里w 32消除殘餘回音及保存實際背景雜訊之間的平衡如 下進行 ^ 3 $雜訊#號相對較高時,非線性處理器3 2停 用,使背景雜訊可穿過回音消除器2〇。此情形中,可忽略 殘餘回^由於遮罩效應為極顯著背景雜訊信號所掩蓋。當 背景雜訊信號相對較低,由於殘餘回音和較安靜背景雜訊 信號一起出現時更可聽,非線性處理器32啟動。兩種情形 中’由於藉由適應性濾波器28實現較佳會聚深度,殘餘回 音很小。 當非線性處理器32啟動時,適宜雜訊產生(藉由適宜雜訊 產生器86)且雜訊位準匹配(藉由雜訊位準匹配器82)至將用 於感受對話之可聽「雜訊閘控」(即從一個背景轉換至另一 個或從一個背景轉換至靜寂的雜訊)減至最小。幾種類型的 適宜雜訊信號可選擇成接近自然背景雜訊信號。此外,為 使轉換平滑適宜雜訊通常取代實際背景雜訊(藉由輸出信 號混合器84),且適宜雜訊位準設置為低於估計背景雜訊位 準一對dB。 圖16係根據本發明一項具體實施例執行適應性背景位準 估計之方法。通常,只有滿足下列3個狀況時(對應於圖16 之決定菱形400、402及404)才可估計背景雜訊信號之位準, 86017 -47- 200417167 ⑴無近端通話器信號’(2)無遠端通話器信號(即無殘餘回 音)以及(3)上述兩個狀況已滿足一段時間。首先,在決定菱 形400決定近端通話器信號位準(Pem)r)是否在錯誤功率限值 以下。錯誤功Ψ P艮值足義為決定是否將錯誤信號視為背景 雜訊信號或近端通話器信號之限值。一項具體實施例中, 錯誤限值為_39 dBmG。此檢查減少混合近端通話器信號與 为景雜訊信號之可能性,因為以下說明之背景能量估計不 能包括近端通話器信號。若PerrQr小於錯誤限值,流程進入 決定菱形402,其中檢查第二狀況。決定菱形4〇2中,為排 除兔景位準估計中的殘餘回音決定遠端通話器信號之位準 (PRin)是否小於Rin限值。Rin限值定義為足以在非線性處理 器前產生顯著殘餘回音之Rin信號位準。一項具體實施例中 ,Rin限值為-27 dBmO。若PRin小於Rin限值,流程進入決定 菱形404,其中決定用於特定時間窗(即背景餘音時間)之前 兩個狀況是否已滿足。即,若背景餘音計時器=〇,則用於 特足時間窗(由背景餘音時間定義)之前兩個狀況已滿足,流 程進入方塊408。背景餘音時間用於確保遠及近端通話器信 號已不在特定時間窗。一項具體實施例中,背景餘音時間 為160樣本,或20 ms,假定取樣速率為8 kHz。 若在決定菱形400 PerrQr不小於錯誤限值或若在決定菱形 402 PRin不小於Rin限值,流程進入方塊4〇6,其中背景餘音 計時器設置為預定值,例如前文所述之背景餘音時間。接 著泥程進入點C。(應注意在點C,流程繼續至圖丨8,其將在 下面進一步說明。)若在決定決定菱形4〇4,背景餘音計時 86017 -48- 200417167 器不為0,則背景餘音計時器在方塊41 〇遞減,流程進入點 C。 然而,當滿足決定菱形400、402及404之3個狀況,流程 進入方塊408,其中背景位準(Pbackgn)und)調適至符合需要 (Pnew—background) ’由隨後之步驟決定。(應注意Pnew_backgr_d 將參考圖17之方塊426計算並說明,因此在經過方塊408之 弟 登代中’ Pnew-background可具有任何適當的初始值,例如 代表適宜雜訊位準之初始值。)為使適宜雜訊位準匹配中從 一個信號位準至另一個之轉換平滑,每一樣本皆進行調適 。因此,如以下公式10所示執行調適。 公式 10 · Pbackground(n)=[(R-l)pbackgr()und(n])+Maximum and minimum coefficient power of each meal level. That is, if the filter coefficient is divided into B bins, each bin will be related to one of the power values of the coefficients in the bin (for example, the average power of the coefficients in the bin). In block 346, select the B bins. The maximum power value and the minimum power value of B bins. The process continues to the decision diamond 348, which depends on whether the ratio of the maximum power value to the minimum power value (that is, maximum power / minimum power) is less than the alarm limit. If the filter is adjusted to the true union, the ratio of the maximum power to the minimum power should be much greater than 丨. On the other hand, if the ratio of the maximum power to the minimum power is close to the value, it clearly indicates that the comparator is not adapted to the true merge. The ratio is used as an alarm limit to signal no merge possibility. The selection of alarm limits is based on statistical analysis of the behavior of adaptive filters under various mergers. In a specific embodiment, the alarm limit is selected as 80, and the 'after comparison' process continues to block 35, where the filter coefficients of the adaptive filter 28 are reset to zero (or set to any other-or Multiple scheduled weights (86017 • 43-200417167 setting). Flow continues to block 352, where the alarm status is incremented. (The alarm status indicates how many times the filter coefficient has been reset in the current time period when the ratio of the maximum power to the minimum power is less than the alarm limit. It should be noted that the current time period is the same as J * L described above with reference to Figure 12, because When leaving blocks 3 and 10 of FIG. 12, the flow continues to block 228 of FIG. 9, which is illustrated in FIG. 15 and starts at block 344 of FIG. 15. That is, FIG. 15 is regarded as a background processing part, which is at most every J * L samples are entered, as shown in Figures 9 and 12.) After block 352, the process proceeds to a decision diamond 354, which determines whether the alarm state is equal to the bypass limit. If not, the echo canceller 20 will not be put into the bypass mode, so the adaptive wave filter 28 will be adjusted. However, if it is determined that the diamond 3 5 4 alarm state has reached the bypass limit, the flow proceeds to block 356, where the bypass mode is set to i, indicating that the open loop condition has been detected (that is, there is no merge), so the echo cancellation is bypassed The device 20 avoids adapting to non-existent merges. If in the decision diamond 348 determines that the ratio of the maximum power to the minimum power is not less than the alarm limit, the flow proceeds to block 358, where the alarm state is reset to zero. The flow enters the decision diamond 360, which determines whether the bypass mode is 1, and if yes, resets it to 0 in block 362. Therefore, the branch of 358 makes the merging 16 reconnectable, in which the adaptive filter 28 starts to adapt again. FIG. 5 is a part of the non-linear processor 32 of FIG. 2. As mentioned above, in addition to reducing or removing the residual echo, the 'non-linear processor 3 2 also attempts to save or match the background noise of the signal of the near-end talker, which provides improved communication quality. Generally, the non-linear processor 32 detects whether the residual echo is below a certain limit and replaces it with appropriate noise instead of silence to avoid the sudden disappearance of background noise on the telephone line. The sudden disappearance of this kind of scene noise can lead to the impression that the telephone company has been disconnected from 86017 -44- 200417167. One prior art method that is still in use uses synthetic background noise, however, 'this can lead to a destructive exchange between real background noise and synthetic background noise. For example, one prior art method that is still in use uses white noise as the appropriate noise. However, white noise is very different from natural background noise ’so it sounds destructive. An alternative solution currently available is to repeatedly output a pre-stored background noise signal to match the background noise. However, this method requires additional storage space, causing significant background noise to repeat, which is also destructive to communication. Therefore, 'a specific embodiment of the non-linear processor 32 is provided in FIG. 5 and FIGS. 16 to 19', which stores or matches the natural background noise in the echo canceller 20, so as to reduce the non-natural signal caused by the non-linear processing by reducing the return , Such as the destructive unnatural signals described above. The non-linear processor 32 uses the short-term level estimator 88 and the long-term signal level estimator 92 to find a reliable estimate of the true background noise signal level and adjust its limits (NLp_ON and NLPJ3FF limits' This is explained below). The short-term estimator produces a fast level estimate of the background noise signal at the beginning of the call. On the other hand, the goal of the adaptive feature of the long-term estimator is to reliably track the background noise signal level at any time. The decision to activate the non-linear processor 32 is based on the relative levels of the far-end signal, near-end signal, and background noise signal. When the background noise signal is significant, the non-linear processor 32 saves the original background noise signal by transmitting it through the echo canceller 20. When the background noise signal is low and the residual echo is audible, the non-linear processor 3 2 replaces the residual echo with a suitable noise signal whose level is a pair of dB lower than the estimated background noise signal level. The resulting suitable noise signal is also gradually mixed into the original 86017 -45- 200417167 background noise signal in order to minimize the conversion audibility. Therefore, the non-linear processor 32 saves natural background noise or matched background noise and minimal audible effects when needed. The preservation or matching of the natural background noise in the echo canceller 20 is performed in four basic steps: (1) estimating the level of the background noise signal, the far-end talker signal and the near-end talker signal; (2) determining the nonlinearity Limits of the processor 32; (3) if a non-linear processor 32 is needed, suitable noise is generated; and (4) if a non-linear processor 32 is needed, suitable noise is mixed into background noise. The non-linear processor 32 of FIG. 5 includes an adaptive background level estimator 96, which includes a short-term background level estimator 88, a background level estimator controller 90, a long-term background level estimator 92, and a background level configuration.接 器 94。 94. The background noise level estimation is performed by a short-term background level estimator 88 and a long-term background level estimator 92. When a call is turned on, the short-term background level estimator ⑽ provides an initial fast estimation, and the long-term background level estimator 92 gradually adjusts to the level of the background noise signal at any time. It should be noted that when the background noise level changes, the adaptation rate of the long-term background level estimator 92 to a higher noise level is slower than the adaptation rate to a lower noise level. Therefore, the estimators 88 and 92 are activated when the levels of the near-end and far-end talker signals are both below a predetermined limit. That is, if a value is available for long-term background level estimation, only the estimator 92 is used. Therefore, when the long-term background level estimator 92 is not yet available, the short-term background level estimator is "usually = used to start (that is, call start). (The levels of the near-end and far-end talker signals are determined by the near-end signal, respectively. Level estimator 70 and remote signal level estimation are determined.) ^ The limit for turning on the non-linear processor 32 (implemented by the non-linear processor on-off control 86017 • 46- 200417167 controller 76) is different from Turn off its limit (executed by non-linear processor shutdown controller 78). When the near-end talker signal is negligible and the far-end talker signal is enabled, the non-linear processor enable controller 76 is enabled (or enabled) ) Non-linear processor 32. When the near-end talker signal is relatively high or the background noise signal is significant, the non-linear processor closes the controller 78 to disable (or close) the non-linear location w 32 to eliminate residual echo and save The balance between the actual background noise is as follows ^ 3 When the $ Noise # is relatively high, the non-linear processor 32 is disabled, so that the background noise can pass through the echo canceller 20. In this case, it can be ignored Residual back ^ due to the mask effect is Masked by significant background noise signals. When the background noise signal is relatively low and is more audible due to the presence of residual echoes and quieter background noise signals, the non-linear processor 32 is activated. In both cases, 'by adapting The noise filter 28 achieves a better convergence depth, and the residual echo is small. When the non-linear processor 32 is started, suitable noise generation (by the suitable noise generator 86) and noise level matching (by the noise bit The quasi-matcher 82) minimizes audible "noise gating" (ie, transitioning from one background to another or from one background to silence) for feeling the conversation. Several types of suitable noise signals can be selected to be close to natural background noise signals. In addition, to smooth the transition, suitable noise usually replaces the actual background noise (by the output signal mixer 84), and the appropriate noise level is set to a pair of dB below the estimated background noise level. FIG. 16 illustrates a method for performing adaptive background level estimation according to a specific embodiment of the present invention. Generally, the level of the background noise signal can be estimated only when the following three conditions are met (corresponding to the decision diamonds 400, 402, and 404 in Figure 16), 86017 -47- 200417167 ⑴ No near-end talker signal '(2) There are no far-end talker signals (that is, no residual echo) and (3) the above two conditions have been met for some time. First, the decision diamond 400 determines whether the near-end talker signal level (Pem) r) is below the error power limit. The error function value is the limit for deciding whether to consider an error signal as a background noise signal or a near-end talker signal. In a specific embodiment, the error limit is _39 dBmG. This check reduces the possibility of mixing near-end talker signals with scene noise signals because the background energy estimates described below cannot include near-end talker signals. If PerrQr is less than the error limit, the process proceeds to decision diamond 402 where a second condition is checked. In decision diamond 40, it is determined whether or not the remote talker signal level (PRin) is less than the Rin limit in order to eliminate the residual echo in the rabbit scene level estimation. The Rin limit is defined as the level of the Rin signal sufficient to produce a significant residual echo before the non-linear processor. In a specific embodiment, the Rin limit is -27 dBmO. If PRin is less than the Rin limit, the process proceeds to a decision diamond 404, where it is determined whether the two conditions before a specific time window (ie, background reverberation time) have been met. That is, if the background reverb timer = 0, then the two conditions before the special time window (defined by the background reverb time) have been met, and the process proceeds to block 408. The background reverberation time is used to ensure that the far-end and near-end talker signals are no longer within a specific time window. In a specific embodiment, the background reverberation time is 160 samples, or 20 ms, assuming a sampling rate of 8 kHz. If it is determined that the diamond 400 PerrQr is not less than the error limit or if the diamond 402 PRin is not less than the Rin limit, the process proceeds to block 406, where the background reverb timer is set to a predetermined value, such as the background reverb time described above. Then go to point C after the mud journey. (It should be noted that at point C, the flow continues to Figure 丨 8, which will be further explained below.) If the decision is made to determine the diamond shape 40, the background reverb timer 86017 -48- 200417167 is not 0, then the background reverb timer is at Block 41 is decremented, and the flow enters point C. However, when the three conditions of the decision diamond 400, 402, and 404 are satisfied, the flow proceeds to block 408, where the background level (Pbackgn) und is adjusted to meet the needs (Pnew_background) 'is determined by the subsequent steps. (It should be noted that Pnew_backgr_d will be calculated and explained with reference to block 426 in FIG. 17, so in the substitution of block 408, 'Pnew-background may have any appropriate initial value, such as an initial value representing a suitable noise level.) Smooths the transition from one signal level to another in suitable noise level matching, and each sample is adjusted. Therefore, the adaptation is performed as shown in Equation 10 below. Equation 10Pbackground (n) = ((R-l) pbackgr () und (n)) +

Pnew_background]/R 么式10中,Pbackgr()und(n)係時間η上的估計背景功率位準; Pnew—background係調適之新背景功率位準(在第四步驟中決定) ;R係控制調適速率之因數,其設置為FAST—RATE或 SLOW一RATE。(應注意R可在圖17之方塊428或圖19之方塊 480、472或476中設置,以下將詳細說明。同樣,應注意在 項具體實施例中’ FAST一RATE調適速率設置為29而 SLOW一RATE設置為 211。) 方塊408之後,背景雜訊信號之功率位準估計開始,其包 括3個主要步騾。估計背景雜訊信號功率位準之第一步驟係 在一窗内計算背景功率位準。因此流程進入方塊412,其中 有έ η景之功率(PwindGW—baekgr()und)係如以下公式11所示計 算。 〜 86017 49- 200417167 公式11 :Pnew_background] / R In Equation 10, Pbackgr () und (n) is the estimated background power level at time η; Pnew_background is the new background power level adjusted (determined in the fourth step); R is the control The adjustment rate factor is set to FAST_RATE or SLOW_RATE. (It should be noted that R can be set in block 428 in FIG. 17 or block 480, 472, or 476 in FIG. 19, which will be described in detail below. Also, it should be noted that in the specific embodiment, the 'FAST-RATE adjustment rate is set to 29 and SLOW A RATE is set to 211.) After block 408, the power level estimation of the background noise signal starts, which includes 3 main steps. The first step in estimating the background noise signal power level is to calculate the background power level in a window. Therefore, the flow proceeds to block 412, in which the power of the scene (PwindGW_baekgr () und) is calculated as shown in Equation 11 below. ~ 86017 49- 200417167 Formula 11:

) 1 ^^Size-X window background = ;~~~ 7 (error singal 46)2 ^ size ^ v & / 錯) 1 ^^ Size-X window background =; ~~~ 7 (error singal 46) 2 ^ size ^ v & / Error

y\ 1 1 Φ ,P ^ T rwindQW—backgr()und係有窗背景功率位準估計, 誤信號46係位於圖2之加法器34輸出的sin 39及估計信號料 之間的差異,w一size係平均窗尺寸。一項具體實施例中, w 一 size係64樣本。接著,流程進入方塊414,其中背景樣本 計數器遞增。 弟二步驟包括在特定數量時間窗中發現最小 Pwindow—background,W一COimt。(一項具體實施例中,w—c〇unt 係128樣本;然而替代具體實施例中,根據計算最小 Pwindow—background所需時間窗數量w—COUIlt可為任何值。)因此 方塊418之計算(如以下公式12所示)每隔w—size個樣本執行 一次。為執行第二步驟,流程進入決定菱形416,其中決定 背景樣本計數器是否為w一 size。若否,流程進入點c(圖18 内)。若是,流程進入方塊418,其中如以下所示公式丨2決 定有窗背景之最小功率。 公式 12 · Pmin—window—baekg_d = MIN(Pold—min—wind〇w—backgr_d:y \ 1 1 Φ, P ^ T rwindQW-backgr () und is the window background power level estimation, the error signal 46 is the difference between sin 39 and the estimated signal data output by the adder 34 in Fig. 2, w- size is the average window size. In a specific embodiment, w_size is 64 samples. The flow then proceeds to block 414, where the background sample counter is incremented. The second step involves finding the smallest Pwindow_background, W_COimt in a specific number of time windows. (In a specific embodiment, w-count is 128 samples; however, in alternative embodiments, according to the number of time windows w-COUIlt required to calculate the minimum Pwindow_background can be any value.) Therefore, the calculation of block 418 ( As shown in the following formula 12) It is executed once every w-size samples. To perform the second step, the flow proceeds to a decision diamond 416, where it is determined whether the background sample counter is w-size. If not, the process enters point c (in Figure 18). If yes, the flow proceeds to block 418, where the minimum power of the windowed background is determined as shown in the following formula. Equation 12Pmin_window_baekg_d = MIN (Pold_min_wind〇w_backgr_d:

Pwindowbackground) 因此,Pmin—window—background藉由選擇舊最小功率(經過方塊 418之先前疊代中決定的最小功率)及方塊412決定的 Pwindow baekground之間的取小值決走。流程接著進入方塊420 ’其中 Pwindow一background 重設為零。流程進入方塊422,其中 背景樣本計數器重設為〇且窗計數器遞增。流程接著進入點 A,其在圖I7中繼續(以決定菱形424開始)。 適應性背景位準估計之第三步驟λ係決定用於參考方塊 -50- 86017 200417167 408說明之背景位準調適的pnew baekgr_d,並決定方塊4〇8中 使用之調適速率。根據是否係第一次決定Pnew backgr(>und有兩 種不同方法。因此,在決定菱形424中決定是否係初始估計 (表示無可用長期資料,例如在呼叫開始)。若是,流程進入 方塊426,其中Pnew—background設置為第一步驟中計算之 Pwindow_background。流程接著進入方塊428,其中調適速率R設 置為FAST—RATE。然而’右在決定菱形424決定此非初始估 計(表示Pnew—background已可用,因為長期資料可用,例如N個 先前樣本)’流程進入決·定菱形430。應注意若非初始估計 ’決走 Pjiew_ background之方法每隔W—COUnt個窗進行一^欠。因此 ,在決定方塊430,決定窗計數器是否到達〜—c〇unt。若否 ,流程進入點C(圖18内)。然而,若是,流程進入方塊432 ’其中计异Pnew—background。流程接著進入方塊434,其中決 疋调適速率R。(PneW-baekgr()und及r之決定將參考圖19進一步 詳細說明)。流程進入方塊436,其中窗計數器重設為〇,接 著進入方塊438 ’其中Pmin—wind〇W-backgr〇und重設為〇。接著流程 進入點C。 圖19係當Pnew_background可用時決定?_加…。㈣及r之方法 。圖19之方法避免pneW-backgr()und具有從較低位準至較高位準 的大跳越,但當變化係從較高位準至較低位準時,由於此 變化較快故不予此類限制。因此,在一項具體實施例中 Pnew—background限制為不大於Pbaekg_nd之兩倍。若調適係從較 高位準至較低位準圖19之方法亦設置較快之調適速率 (FAST一RATE),若調適係從較低位準至較高位準則設置較 86017 -51· 200417167 忮之速率(SLOW一RATE)。使用不同速率係因為依據背景雜 訊位準,通常由低至高慢速變化時聽起來較佳,但由高至 低則變化較快。 圖19說明圖17之方塊432及434的一部分,流程始於決定 菱木466 ’其中決足pmin_wind〇w—backgr〇und是否大於 苇數倍,即 Prnin—window一background > 常數 * Pbackground」,其中一 項具體貫施例中常數為〇 · 5。若是,流程進入方塊4 7 8,其中 Pnew一background*又置為「(系數 * Pmin一wind〇w_background) +適宜雜訊 位準」。一項具體實施例中,方塊478内常數為2(其中此2對 應先前句中的0·5)。流程接著進入方塊480,其中調適速率 設置為SLOW-RATE。接著流程進入圖17之方塊436。 右在決足愛形466Pmin win(j〇w_background不大於「常數 P b a c k g r。u n d」’則流程進入決定菱形468,其中決定 Pmin—window-background是否大於Pbackground。若是,流程進入方塊 474 ’ 其中 Pnew_background設置為 Pmin_ window一background 0 流程接著 進入方塊476,其中調適速率R設置為SLOW—RATE。接著流 程進入圖17之方塊436。然而,若在決定菱形468決定 Pmin_wind。w_background 不大於 Pbackground ’ 則流程進入方塊 470, 其中 Pnewbackground设置為「Pmin_window_background + 適宜雜訊位 準」。流程接著進入方塊472,其中調適速率R設置為 FAST一RATE,接著進入圖17之方塊436 〇 因此應注思當Pbackground或Pmin_ window—background 恰為 〇 時’為 防止Pnew_backgr〇und靜寂,應加入適宜雜訊位準(comfort noise level ; CNL)(方塊478及470内)。例如,一項具體實施例中 86017 -52- 200417167 CNL設置為-66 dBmO。或者,CNL可在-60至·72 dBmO之範 圍内。同樣,儘管圖19之流程使用功率位準估計執行,相 同的流程可使用數值估計完成。 圖18係依據本發明一項具體實施例,使用以上獲得之全 部位準估計控制非線性處理器的方法。即,圖18說明圖9之 方塊230的一部分,其中執行非線性處理。圖18中,流程始 於點C(其可來自例如方塊406、方塊410或圖16之決定菱形 416,或來自圖17之方塊438)。流程從點C繼續至決定菱形 440,其中決定PerrQr是否大於非線性處理器關閉(NLP_OFF) 限值。若是,流程進入方塊452,其中設置NLP_OFF(表示 關閉非線性處理器32),接著進入方塊454,其中雜訊斜坡 因數重設至預定值。雜訊斜坡因數用於使信號位準由低至 高之轉換平滑。(方塊454之後流程進入圖9之方塊232。)若 在決定菱形440決定Pern)r不大於NLP_OFF限值,流程進入決 定菱形442,其中決定PbaekgrQund是否大於背景限值。若是, 流程進入方塊452,其中非線性處理器32關閉,然後進入方 塊454。因此,當Perror大於NLP_OFF限值或當Pbackground大於 背景限值時非線性處理器32關閉。一項具體實施例中, NLP_OFFP艮值設置為-27 dBmO而背景限值為-39 dBmO 〇 若在決定菱形442決定Pbaekgn)und不大於背景限值,流程進 入決定菱形444,其中決定Pern)r是否小於非線性處理器啟動 (NLP_ON)限值。若是,流程進入決定菱形446,其中決定 AVGPRin是否大於PRin限值。若是,則流程進入方塊448,其 中設置NLP_ON(表示啟動非線性處理器32)。因此,當Perror -53- 86017 200417167 小於NLP_ON限值或當AVG PRin大於PRin限值時非線性處理 器32啟動。AVG PRin大於PRin限值之狀況確保僅在需要時啟 動非線性處理器32(因為只有當遠端通話器信號相對較強 時才會有顯著回音)。另一方面,Perr〇r小於NLP_ON限值之 狀況進一步確保殘餘回音必須很小,且近端通話器信號不 會錯誤視為移除之殘餘回音。因此,一項具體實施例中, PRin限值設置為_36 dBmO而NLP__ON限值設置為-42 dBmO。 然而替代具體實施例中,他們可設置為任何適當值。 應注意在上述具體實施例中,NLP_OFF限值及NLP_ON 限值之間的差異(一項具體實施例中為-15 dBmO)係非線性 處理器32之「死區域」,其有助於避免NLP_ON及NLP_OFF 之間的快速交換。 若決定Perr〇r不小於NLP一ON限值(位於決定菱形444)或 AVG PRin不大於pRin限值(位於決定菱形446),流程進入決定 菱形450,其中決定是否設置NLP-ON(即非線性處理器32是 否啟動)。若NLP—ON未設置,流程進入圖9之方塊232 ;然 而,若其設置(或離開方塊448後),流程進入決定菱形456 ,其中決定是否啟動適宜雜訊。若否,流程進入圖9之方塊 232,然而若其啟動,流程進入方塊458,其中產生適宜雜 訊。方塊458後,流程進入方塊460,其中決定適宜雜訊位 準’接著進入方塊462,其中適宜雜訊與背景雜訊混合。接 著流程進入方塊464,其中調適雜訊斜坡因數,然後進入圖 9之方塊232。 因此,當非線性處理器32啟動適宜雜訊信號就會產生。 86017 -54- 200417167 白色雜訊通常非適宜雜訊之較佳選擇,因為其距日常生活 之真實背景雜訊#號太返。本發明一些具體實施例因此使 用粉紅色雜訊、褐色雜訊或Hoth雜訊作為適宜雜訊。例如 一項具體實施例中’選擇粉紅色雜訊係因為其計算低複雜 性。如以下公式13所示藉由連續實現兩個均衡分佈之偽隨 機變量X可產生類粉紅色雜訊(例如在方塊458内)。 公式 13 : Ypink(n)= C,X(n)+ C2* X(n-l) 上述公式13中,X(n)係時間n產生之偽隨機變量 Χ(η)<1) , (^及^係用於修改兩個隨機樣本之混合及Ypink數 值之常數。因此Ypink(n)係在時間n產生之類粉紅色雜訊樣本 。兩個常數Ci及C2係選擇以確保粉紅色雜訊信號之平均功 率位準低於^background大約2 dB。例如,一項具體實施例中, Cl及C2分別選擇為〇·75及1。因此,一項具體實施例中,適 苴雜訊匹配位準相比估計背景雜訊位準範圍從〇至4。 此具體實施例中產生的適宜雜訊Ypink接著與背景雜訊混 合’如以下公式14所示(亦見圖18之方塊462)。 公式 14 · Sout(n)= a(n)*(error signal 46)-(1-α(η))*Α*Pwindowbackground) Therefore, Pmin_window_background is determined by choosing the smallest value between the old minimum power (the minimum power determined in the previous iteration of block 418) and the Pwindow baekground determined by block 412. The flow then proceeds to block 420 'where Pwindow_background is reset to zero. Flow proceeds to block 422, where the background sample counter is reset to zero and the window counter is incremented. The flow then proceeds to point A, which continues in Figure I7 (starting with decision diamond 424). The third step λ of the adaptive background level estimation is to determine the pnew baekgr_d for the background level adjustment described with reference to block -50- 86017 200417167 408, and to determine the adaptation rate used in block 408. There are two different methods for determining Pnew backgr based on whether it is the first time (> und. Therefore, in decision diamond 424, it is determined whether it is an initial estimate (indicating that no long-term data is available, such as at the beginning of a call). If so, the flow proceeds to block 426 , Where Pnew_background is set to Pwindow_background calculated in the first step. The process then proceeds to block 428, where the adaptation rate R is set to FAST_RATE. However, the 'right' decision diamond 424 determines this non-initial estimate (indicating that Pnew_background is available (Because long-term data are available, such as N previous samples), the process enters the decision diamond 430. It should be noted that if it is not the initial estimation, the method of Pjiew_ background is performed every W_COUnt windows. Therefore, in the decision block 430, it is determined whether the window counter reaches ~ -cunt. If not, the flow enters point C (in Fig. 18). However, if it is, the flow enters block 432 'where the difference is Pnew-background. The flow then proceeds to block 434 where the decision疋 Adapt rate R. (The decision of PneW-baekgr () und and r will be explained in more detail with reference to FIG. 19). 436, where the window counter is reset to 0, and then proceed to block 438 'where Pmin_wind〇W-backgrund is reset to 0. Then the process enters point C. Figure 19 is determined when Pnew_background is available? _Add ... And r. The method in Figure 19 prevents pneW-backgr () und from having a large jump from a lower level to a higher level, but when the change is from a higher level to a lower level, this change is faster Therefore, such restrictions are not allowed. Therefore, in a specific embodiment, Pnew_background is limited to not more than twice Pbaekg_nd. If the adjustment is from a higher level to a lower level, the method of FIG. 19 also sets a faster adjustment. Rate (FAST-RATE). If the adjustment is from a lower level to a higher level, the rate is set to a rate lower than 86017 -51 · 200417167 忮 (SLOW-RATE). The use of different rates is based on the background noise level, which is usually changed from low. It sounds better when changing from high to slow, but it changes quickly from high to low. Figure 19 illustrates a part of blocks 432 and 434 of Figure 17. The process begins with the decision of Lingmu 466 'which depends on pmin_wind〇w-backgr〇und Whether it is several times larger than the reed, that is, Prni n—window_background > Constant * Pbackground ”, one of which is a constant in the specific embodiment. If so, the flow proceeds to block 4 7 8 where Pnew_background * is set to“ (factor * Pmin_wind 〇w_background) + suitable noise level. " In a specific embodiment, the constant in block 478 is 2 (where 2 corresponds to 0.5 in the previous sentence). Flow then proceeds to block 480, where the adaptation rate is set to SLOW-RATE. The flow then proceeds to block 436 in FIG. Right in the shape of love 466Pmin win (j〇w_background is not greater than "constant P backgr.und" 'then the process enters the decision diamond 468, which determines whether Pmin_window-background is greater than Pbackground. If yes, the process enters block 474' where Pnew_background is set A background 0 process for Pmin_ window then proceeds to block 476, where the adaptation rate R is set to SLOW_RATE. Then the process proceeds to block 436 in Figure 17. However, if Pmin_wind is determined in the decision diamond 468. w_background is not greater than Pbackground ', then the process enters block 470, where Pnewbackground is set to "Pmin_window_background + suitable noise level." The process then proceeds to block 472, where the adaptation rate R is set to FAST-RATE, and then to block 436 in Figure 17. Therefore, it should be noted that when Pbackground or Pmin_ window— When the background is exactly 0 ', in order to prevent Pnew_backgrund from being silent, a suitable noise level (CNL) (in blocks 478 and 470) should be added. For example, in a specific embodiment 86017 -52- 200417167 CNL Set to -66 dBmO. Alternatively, CNL can range from -60 to · 7 Within the range of 2 dBmO. Similarly, although the process of FIG. 19 is performed using power level estimation, the same process can be completed using numerical estimation. FIG. 18 is a specific embodiment of the present invention using all the level estimation controls obtained above Method of Non-Linear Processor. That is, FIG. 18 illustrates a portion of block 230 of FIG. 9 in which non-linear processing is performed. In FIG. 18, the flow begins at point C (which may come from, for example, block 406, block 410, or decision of FIG. Diamond 416, or block 438 from Figure 17.) The flow continues from point C to decision diamond 440, where it determines whether PerrQr is greater than the non-linear processor off (NLP_OFF) limit. If so, the flow proceeds to block 452, where NLP_OFF (set Turn off the non-linear processor 32), and then proceed to block 454, where the noise ramp factor is reset to a predetermined value. The noise ramp factor is used to smooth the transition of the signal level from low to high. (The flow after block 454 enters FIG. 9 Block 232.) If it is determined in decision diamond 440 that Pern) r is not greater than the NLP_OFF limit, the process proceeds to decision diamond 442, where it is determined whether PbaekgrQund is greater than the background limit. If so, the flow proceeds to block 452, where the non-linear processor 32 is turned off, and then proceeds to block 454. Therefore, the non-linear processor 32 is turned off when Perror is greater than the NLP_OFF limit or when Pbackground is greater than the background limit. In a specific embodiment, the NLP_OFFP value is set to -27 dBmO and the background limit is -39 dBm0. If the decision diamond 442 determines that Pbaekgn) und is not greater than the background limit, the process enters the decision diamond 444, where the decision Pern) r Whether it is less than the non-linear processor start (NLP_ON) limit. If so, the process proceeds to decision diamond 446, which determines whether AVGPRin is greater than the PRin limit. If yes, the flow proceeds to block 448, where NLP_ON is set (indicating that the non-linear processor 32 is started). Therefore, the non-linear processor 32 is activated when Perror -53- 86017 200417167 is less than the NLP_ON limit or when AVG PRin is greater than the PRin limit. The condition that the AVG PRin is greater than the PRin limit ensures that the non-linear processor 32 is activated only when needed (because there will be a significant echo only when the far-end talker signal is relatively strong). On the other hand, the condition that Perr0r is less than the NLP_ON limit further ensures that the residual echo must be small and that the near-end talker signal is not mistakenly considered as the residual echo removed. Therefore, in a specific embodiment, the PRin limit is set to _36 dBmO and the NLP__ON limit is set to -42 dBmO. However, in alternative embodiments, they can be set to any appropriate value. It should be noted that in the above specific embodiment, the difference between the NLP_OFF limit and the NLP_ON limit (-15 dBmO in a specific embodiment) is the "dead zone" of the non-linear processor 32, which helps to avoid NLP_ON And NLP_OFF fast exchange. If it is determined that Perror is not less than the NLP-ON limit (located in decision diamond 444) or AVG PRin is not greater than the pRin limit (located in decision diamond 446), the process proceeds to decision diamond 450, which determines whether to set NLP-ON (that is, non-linear Whether the processor 32 is started). If NLP_ON is not set, the process proceeds to block 232 in FIG. 9; however, if it is set (or after leaving block 448), the process enters a decision diamond 456, which determines whether to enable appropriate noise. If not, the flow proceeds to block 232 in FIG. 9, but if it is activated, the flow proceeds to block 458 where a suitable noise is generated. After block 458, the flow proceeds to block 460 where the appropriate noise level is determined 'and then proceeds to block 462 where the appropriate noise is mixed with the background noise. The flow then proceeds to block 464, where the noise ramp factor is adjusted, and then to block 232 of FIG. Therefore, a suitable noise signal is generated when the non-linear processor 32 is activated. 86017 -54- 200417167 White noise is usually not a better choice for suitable noise, because it is too far from the background noise of daily life #No. Some embodiments of the present invention therefore use pink noise, brown noise, or Hoth noise as suitable noise. For example, in one embodiment, 'pink noise' is selected because of its low computational complexity. As shown in Equation 13 below, pink-like noise can be generated by continuously achieving two pseudo-random variables X of the equilibrium distribution (for example, in block 458). Formula 13: Ypink (n) = C, X (n) + C2 * X (nl) In the above formula 13, X (n) is a pseudo-random variable X (η) < 1) generated by time n, (^ and ^ Is used to modify the mixture of two random samples and the constant of the Ypink value. Therefore, Ypink (n) is a pink noise sample generated at time n. The two constants Ci and C2 are selected to ensure the pink noise signal The average power level is about 2 dB below ^ background. For example, in a specific embodiment, Cl and C2 are selected as 0.75 and 1. Therefore, in a specific embodiment, the noise matching level is suitable. The estimated background noise level ranges from 0 to 4. The appropriate noise Ypink generated in this specific embodiment is then mixed with the background noise 'as shown in Equation 14 below (see also block 462 in Figure 18). Equation 14 Sout (n) = a (n) * (error signal 46)-(1-α (η)) * Α *

Ypink(n) 上述公式14中,Α係將要匹配之背景雜訊位準的數值(對 應方塊460)。例如一項具體實施例中,之平方 根。替代具體實施例中,若Pbaekgr。—以數值而非功率代表 ’ A — pbaCkground。公式14中,α(η)係在時間η之雜訊斜坡因 數(其中0$ α<1),其在非線性處理器32之開始提供由一個位 率至另一個的平滑轉換,Sout(n)係非線性處理器32在時間η 86017 -55- 200417167 之最終輸出(即Sout(n)係圖2之Sout 42)。每個樣本以公式15 計算雜訊斜坡因數(在方塊464已調適)。 公式 15 : a(n)= b * α(η -1) 么式15中’ b係斜坡常數’其選擇小於1。一項具體實施 例中大約為0.9986,其大約在500 ms内衰減之其本身,因為 0·99865ί)()=0·496。此斜坡方法過程中,sout⑻從錯誤信號46 開始(其係Sin 39-圖2之錯誤估計信號48)並逐漸轉換至a * Ypink(n) ’若斜坡方法繼續,α(η)由1變為〇。斜坡可應用於 非線性處理器32之開始及偏移。然而,一項具體實施例中 斜坡僅應用於非線性處理器32之開始。原因係當非線性處 理器32關閉時,其通常偵測一顯著位準之近端通話器信號 ,可不需要逐漸從適宜雜訊(一項具體實施例中為粉紅色雜 訊信號)轉換回至近端通話器信號。然而當非線性處理器32 啟動及關閉時替代具體實施例可應用此斜坡。 圖7係監測及控制單元30之一部分,其功能為消除純延遲 。如上所述,純延遲估計係用於減少適應性濾波器28之分 接數量,從而以較少計算獲得更快及更深之會聚。即,圖7 說明之監測及控制單元30的一部分及圖20至24之流程圖可 用以偵測純延遲及定位稀疏窗(圖9之方塊211)。一項具體實 施例中係偵測純延遲並定位具有正確尺寸之濾波窗(稀疏 窗),以便減小適應性濾波器28之長度(即分接數量)。因此 圖7將參考圖20至24之流程說明。 圖7及20至24提供一項具體實施例,其用於實現回音信號 (用以回音消除器20内稀疏窗定位)純延遲(即圖37之Τ1)估 86017 -56- 200417167 計。執行純延遲估計,如以下所詳細說明,伤益山m 你精由用正確 定位之狹窄窗適應性濾波器取代完整窗適應性遽、波器、咸心 與覆蓋大回音路徑延遲範圍相關連之計算成本。即,並T 使用覆蓋圖37之整個脈衝回應的完整窗適應性減波器,其 大至足以覆蓋T1及T4+T2,而使用較小窗(稀疏窗),其排除 純延遲部分並為捕獲T4+丁 2定位,該部分中會出現顯著回應、 。同樣’純延遲估計藉由使用較短長度之適應性滤波器增 加適應性濾波器28的會聚速度及深度。同樣,純延遲估^十 可用於動態監測改變回音(例如在電話呼叫中)之純延遲並 因此調整適應性濾波器窗(例如稀疏窗)。 本文將說明之具體實施例可包括被動方法(例如子速率 濾波器調適僅使用對話信號)以及主動方法(例如在呼叫開 始注入短、窄頻帶極低位準雜訊脈衝,同時為建立用於呼 叫之純延遲執行子速率調適,其在兩個方向上皆以靜寂開 始,其中通常持續300 ms之靜寂足以注入低位準探測信號 及決定純延遲)。本文說明之具體實施例亦包括兩種用以處 理純延遲之狀況。第一種狀況係關於電話呼叫之開始,其 中服務品質(Quality of Service ; QoS)原則需要迅速減少回 音。第二種狀況係關於在電話呼叫中間改變回音路徑。通 常,稀疏窗(以及相關純延遲)在電話呼叫持續時間中始終不 會改變。然而,一些呼叫(尤其例如其中啟動「呼叫轉接」 或「會議呼叫」的那些)中純延遲可大幅度改變。因此,本 文說明之各種具體實施例支援純延遲之動態,其對應稀疏 窗高至每秒一次之變化。應注意本文說明之具體實施例可 86017 -57- 200417167 使用藉由控制信號17提供之專屬(即非標準)發信號決定電 話是否係挂電話狀態或拿起狀態9以便決定呼叫之開始或 結束。 圖7及圖20至24之具體實施例可使用子速率調適方法,其 提供純延遲計算有效估計。然而,替代具體實施例可不使 用子速率方法。同樣,一項具體實施例中,為處理純延遲 之固有可變估計,純延遲原始測量結果可在其返回適應性 濾波器28前進行非線性濾波(即使用決定或資格方法,其範 例將參考圖23說明)。上述子速率方法可使用正規化最小均 方(Normalized Least Mean Square ; NLMS)適應性滤波器(用 於圖7之適應性濾波器122)。然而,適應性濾波器122並不 限於此適應性濾波類型,例如,可適應PNLMS、RLS或其 他適應性濾波器。應注意NLMS適應性濾波演算法通常簡單 且具有可接受的會聚特徵。其他適應性濾波器演算法要求 更多計算。正比正規化LMS(Proportionate Normalized LMS ;PNLMS)演算法提供會聚特性在適當計算成本上之有形改 進。遞迴最小均方(Recursive Least Squares ; RLS)適應性演 算法通常顯著較快(但計算成本亦顯著較高)。然而,其對數 字錯誤敏感並出現數字不穩定性。其他適應性濾波器(例如 次帶、仿射及其變化)從會聚特性觀點更具吸引力,儘管與 NLMS相比他們計算上要求更多。然而,本文說明之具體實 施例並不限於使用NLMS適應性濾波。主要速率適應性濾波 器以及子速率適應性濾波器皆可基於適應性濾波解決方案 之其他類型。 86017 -58- 200417167 、、’屯延遲估计可藉由諸如短期子速率信號功率估計及子速 率近端通話器信號偵測此類機制控制,以便防止產生固有 不可靠(受雜訊或近端通話之影響)之測量並因此導致子速 率適應性濾波器122之發散。應注意參考適應性濾波器28之 上述說明中調適方法在偵測S g e η時為避免產生錯誤係數終 止,相同原則可應用於決定純延遲中使用的適應性濾波器 122 〇 " 除縮短適應性濾波器長度外,純延遲估計可用於處理其 他情況,例如當遠端回音消除器關閉,當呼叫從本地向長 距離轉換(例如藉由呼叫轉接功能,呼叫傳送功能等等),當 會議呼叫操作具有分散在很大地理區域上的呼叫中/已呼 叫方等等。 圖7以万塊圖形式說明用以提供估計延遲13〇之監測及控 制單元3G# _分。適應性遽波器122卜項具體實施例中 其使用子速率處理,係子速率適應性滤波器)在電話呼叫持 績時間中提供連續基礎上的帶通脈衝回應之短期估計。脈 衝回應之純延㈣量係使用資格方法或決定方法(例如圖 23)連續滤波’其如上所述可為非線性遽波器。此遽波器在 呼叫開始提供純延遲之快速決定,並在呼叫中間提供純延 遲調整或新純延遲選擇,但新純延遲值係通過與驗證新值 相關《標準° ’為將回音發生減至最小,在呼叫中間從 -個純《轉換至另—個可根據純延遲測量適當的驗證決 疋…項具體實施例中,驗證提供用以在呼叫中間改變純 延遲之守恒機㈣j如藉由特三個或更多子速率脈衝回 86017 -59- 200417167 應最大值位置之測量結果)。 一選擇性版本中,如參考圖24所說明,回音消除器2〇可 以監測模式操作。此模式中,圖7之系統只在電話呼叫開始 啟動(即估計純延遲),然後若滿足特定狀況,其進入待用狀 態。待用狀態中,ERLE估計器連續以限值檢查對應適應性 滤波器28之ERLE,若ERLE降至限值以下並保持一預定持續 時間’圖7之系統返回動態模式並繼續估計純延遲。 圖20之泥程始於決定菱形482,其中決定純延遲估計選項 疋否啟動。應注意此選項可對應編程到回音消除器2〇内之 設置。此情形中,決定選項是否啟動不需在每一樣本基礎 上完成’如圖20所示。替代具體實施例中,決定菱形482之 決定可在電話呼叫開始完成。然而,只有純延遲估計選項 啟動液程才會進入決定菱形483。若其未啟動(是否在呼叫 開始或在每一樣本基礎上決定)流程進入圖9之方塊213,因 為純延遲估計不會執行。 決定菱形483決定是否啟動呼叫開始之選擇性串列。適應 純延遲估計選項,串列選項亦可編程到回音消除器2〇内, 從而在電話呼叫之開始而非每個樣本上檢查,如圖20所示 。若選擇性串列未啟動,流程進入圖21之決定'菱形484。然 而若選擇性串列啟動,流程進入決定菱形497。總之,若選 擇性串列未啟動,則不需要圖20之流程。同樣,若純延遲 估計選項未啟動,則不需要圖20及21之流程。因此,回音 消除器20可以各種不同方法操作,取決於選擇之設置及選 項0 86017 -60- 200417167 亦應注意在每個電話呼叫之開始,可初始化許多變數以 用於圖20至24之流程。例如’―項具體實施例中,串列旁 通旗標設置為FALSE,純延遲樣本計數器重設,串列索^ 重'’ ERLE计數器重設。這些變數將在圖2〇至24之整個流 程中說明。同m —些值可編程或S1線式到回音消除器2〇 内。例如,測量週期_在每個呼叫之開始初始化為一:定 值或固線式到回音消除器_。應注意整個說明中所述兑 他變數可在每個呼叫之開始初始化或固線式或編程(永久 性或否)到回音消除器2〇内。 右在決定菱形483決定啟動呼叫開始之選擇性串列,流程 進入決定菱形497。選擇性串列使純延遲可在呼叫開始估計 。因為在呼叫-開# ’通常尚未有對話,串列信號可注入 Rin 43以產生Rout 40(見圖2之串列信號41,其可藉由加法器 36/主入1^1143)。即,若揲適當之1^1143能量,則不可能決定 純延遲,因此串列信號41之注入可用以決定純延遲估計。 通常,串列信號41係在電話呼叫開始對話之前注入之較低 能量的短叢發。即串列信號41通常小於注入限值,其在一 項具體實施例中係在範圍-30 dBmO至-55 dBmO内。因此, 若選擇性串列啟動,流程進入決定菱形49?,其中決定串列 旁通旗標是否為TRUE。若是,流程進入圖21之決定菱形484 ,一起繞過串列並繼續圖2 1之純延遲估計,如以下所說 明。 若在決定菱形497,決定串列旁通旗標不設置為TRUE, 泥程進入決定菱形499,其中決定串列索引是否小於或等於 86017 •61- 200417167 2。_列索引確保串列信號(若使用)只在呼叫開始注入。如 上所述,串列索引可在呼叫開始重設,因此,第一次到達 決定菱形499時,串列索引應小於或等於1(因其最初重設為 零)。如以下將要說明,儘管第一測量週期後(一項具體事實 例中其為300毫秒),串列索引將遞增至一(例如圖21之方塊 505内)。此仍然提供串列信號之注入,因為串列索引仍然 小於或等於一。然而,隨後測量週期後,串列索引將遞增 至二(例如圖21之方塊505内),從決定菱形499此點開始,流 程進入圖21之決定菱形484,而不再可能注入串列信號41 , 因為串列索引為2指示其不再視為呼叫之開始。在呼叫開始 之外的另一時間注入串列信號通常不合需要,因為對呼叫 各方其係可聽。 若在決定菱形,串列索引小於或等於一,則流程進入方 塊489,其指示其仍然視為呼叫之開始。方塊4的中,計算 Sm(PSin)及Rin(pRin)的長期功率(其可使用上述公式1、3及4 完成)。流程接著進入決定菱形490,其中決定Psin是否小於Ypink (n) In Equation 14 above, A is the value of the background noise level to be matched (corresponding to block 460). For example, in a specific embodiment, the square root. In the alternative embodiment, if Pbaekgr. —Represent ‘A — pbaCkground as a value, not power. In Equation 14, α (η) is the noise ramp factor at time η (where 0 $ α < 1), which provides a smooth transition from one bit rate to another at the beginning of the non-linear processor 32, Sout (n ) Is the final output of the non-linear processor 32 at time η 86017 -55- 200417167 (that is, Sout (n) is Sout 42 of Fig. 2). The noise slope factor is calculated for each sample using Equation 15 (adjusted at block 464). Formula 15: a (n) = b * α (η -1) In formula 15, 'b is the slope constant', and the choice is less than 1. In a specific embodiment, it is about 0.9986, which is itself attenuated in about 500 ms because 0.99865ί) () = 0.496. During this ramp method, Sout⑻ starts from error signal 46 (which is Sin 39-error estimation signal 48 of Figure 2) and gradually changes to a * Ypink (n) 'If the ramp method continues, α (η) changes from 1 to 〇. The ramp can be applied to the start and offset of the non-linear processor 32. However, in one embodiment the ramp is applied only to the beginning of the non-linear processor 32. The reason is that when the non-linear processor 32 is turned off, it usually detects a significant level of near-end talker signal, and it may not be necessary to gradually switch back from suitable noise (a pink noise signal in a specific embodiment) to Near-end talker signal. However, alternative embodiments may apply this ramp when the non-linear processor 32 is turned on and off. Figure 7 is part of the monitoring and control unit 30, whose function is to eliminate pure delay. As described above, pure delay estimation is used to reduce the number of taps of the adaptive filter 28, thereby achieving faster and deeper convergence with fewer calculations. That is, a part of the monitoring and control unit 30 illustrated in FIG. 7 and the flowcharts in FIGS. 20 to 24 can be used to detect pure delay and locate the sparse window (block 211 in FIG. 9). A specific embodiment detects pure delay and locates a filter window (sparse window) with the correct size in order to reduce the length of the adaptive filter 28 (i.e., the number of taps). Therefore, Fig. 7 will be explained with reference to the flow charts of Figs. Figures 7 and 20 to 24 provide a specific embodiment for realizing the pure delay (that is, T1 in Figure 37) of the echo signal (for sparse window positioning in the echo canceller 20) estimates 86017 -56- 200417167. Perform pure delay estimation, as explained in detail below. You Yishan Meng is calculated by replacing the full window adaptive chirps, wave filters, and cores with the correct range of narrow window adaptive filters. cost. That is, T uses a full window adaptive attenuator that covers the entire impulse response of Figure 37, which is large enough to cover T1 and T4 + T2, while using a smaller window (sparse window), which excludes the pure delay part and captures T4 + Ding 2 positioning, there will be a significant response in this part,. Also, 'pure delay estimation increases the convergence speed and depth of the adaptive filter 28 by using a shorter length adaptive filter. Similarly, pure delay estimation can be used to dynamically monitor pure delays that change the echo (for example, in a phone call) and adjust the adaptive filter window (for example, the sparse window) accordingly. Specific embodiments to be described herein may include passive methods (such as sub-rate filter adaptation using only dialog signals) and active methods (such as injecting short, narrowband very low-level quasi-noise pulses at the beginning of a call, and The pure delay performs sub-rate adaptation, which starts with silence in both directions, where silence usually lasting 300 ms is sufficient to inject low-level detection signals and determine pure delay). The specific embodiments described herein also include two situations for handling pure delays. The first situation is about the beginning of a telephone call, in which the Quality of Service (QoS) principle needs to reduce the echo quickly. The second situation is about changing the echo path in the middle of a phone call. In general, the sparse window (and associated pure delay) does not change throughout the duration of a phone call. However, the pure delay in some calls (especially those where "Call Forwarding" or "Conference Call" is activated) can vary significantly. Therefore, the various embodiments described herein support dynamics of pure delay, which correspond to changes in the sparse window up to once per second. It should be noted that the specific embodiment described herein may use the exclusive (ie, non-standard) signaling provided by the control signal 17 to determine whether the phone is on-hook or picked up 9 to determine the start or end of the call. The specific embodiments of Figs. 7 and 20 to 24 may use a sub-rate adaptation method that provides a valid estimate of pure delay calculations. However, alternative embodiments may not use the sub-rate method. Similarly, in a specific embodiment, in order to deal with the inherently variable estimation of pure delay, the raw measurement result of pure delay can be filtered non-linearly before it returns to adaptive filter 28 (that is, using a decision or qualification method, examples of which will be referred to Figure 23 illustrates). The above-mentioned sub-rate method may use a normalized least mean square (NLMS) adaptive filter (for the adaptive filter 122 of FIG. 7). However, the adaptive filter 122 is not limited to this type of adaptive filtering, for example, it can adapt to PNLMS, RLS, or other adaptive filters. It should be noted that NLMS adaptive filtering algorithms are usually simple and have acceptable convergence characteristics. Other adaptive filter algorithms require more calculations. Proportionate Normalized LMS (PNLMS) algorithms provide a tangible improvement in convergence characteristics at appropriate computational costs. Recursive Least Squares (RLS) adaptive algorithms are usually significantly faster (but computational costs are also significantly higher). However, it is sensitive to digital errors and digital instability. Other adaptive filters (such as subbands, affine, and their variations) are more attractive from the point of view of convergence characteristics, although they are computationally more demanding than NLMS. However, the specific embodiments described herein are not limited to the use of NLMS adaptive filtering. Both primary rate adaptive filters and sub-rate adaptive filters can be based on other types of adaptive filtering solutions. 86017 -58- 200417167 The delay estimation can be controlled by mechanisms such as short-term sub-rate signal power estimation and sub-rate near-end talker signal detection to prevent inherently unreliable (noisy or near-end calls Measurement) and therefore the divergence of the sub-rate adaptive filter 122. It should be noted that in the above description with reference to the adaptive filter 28, in order to avoid the termination of the error coefficient when detecting S ge η, the same principle can be applied to determine the adaptive filter used in the pure delay. In addition to the filter length, pure delay estimation can be used to handle other situations, such as when the far-end echo canceller is turned off, when the call is switched from the local to a long distance (for example, by the call transfer function, call transmission function, etc.), when the conference Call operations have calls / callees spread over a large geographic area, and so on. Figure 7 illustrates the monitoring and control unit 3G # _min used to provide an estimated delay of 13 in the form of a 10,000-block diagram. In the specific embodiment of the adaptive waver 122, it uses sub-rate processing, which is a sub-rate adaptive filter) to provide a short-term estimate of the band-pass impulse response on a continuous basis during the phone call performance time. The pure delay of the pulse response is a continuous filtering using a qualification method or a decision method (for example, Fig. 23), which may be a non-linear wave filter as described above. This waver provides quick decision of pure delay at the beginning of the call, and provides pure delay adjustment or new pure delay selection in the middle of the call, but the new pure delay value is related to the verification of the new value. Minimum, in the middle of a call, switch from one pure "to another" which can be properly verified based on pure delay measurement ... In a specific embodiment, the verification provides a conservation machine to change the pure delay in the middle of the call. Three or more sub-rate pulses return to the measurement result of the maximum position (86017 -59- 200417167). In an alternative version, as explained with reference to Fig. 24, the echo canceller 20 may be operated in a monitor mode. In this mode, the system of Fig. 7 is activated only at the beginning of a telephone call (that is, an estimated pure delay), and then if it meets a specific condition, it enters a standby state. In the standby state, the ERLE estimator continuously checks the ERLE of the corresponding adaptive filter 28 with the limit value. If the ERLE drops below the limit value and maintains a predetermined duration ', the system of Figure 7 returns to the dynamic mode and continues to estimate the pure delay. The mud course of FIG. 20 starts with the decision diamond 482, in which it is decided whether the pure delay estimation option 启动 is enabled. It should be noted that this option corresponds to the setting programmed into the echo canceller 20. In this case, the decision whether or not to activate the option need not be done on a per sample basis' as shown in FIG. 20. In an alternative embodiment, the decision to decide diamond 482 may be made at the beginning of a telephone call. However, only the pure delay estimation option start flow will enter the decision diamond 483. If it is not started (whether it is decided at the beginning of the call or on a per sample basis), the process proceeds to block 213 in FIG. 9 because pure delay estimation will not be performed. The decision diamond 483 decides whether to enable selective serialization of call start. Adapting to the pure delay estimation option, the tandem option can also be programmed into the echo canceller 20 to check at the beginning of the phone call instead of each sample, as shown in Figure 20. If the selective serialization is not started, the flow proceeds to the decision 'diamond 484' of FIG. 21. However, if selective serialization is initiated, the process proceeds to decision diamond 497. In short, if the selective serialization is not activated, the flow of FIG. 20 is not required. Similarly, if the pure delay estimation option is not enabled, the processes of Figures 20 and 21 are not required. Therefore, the echo canceller 20 can be operated in various ways, depending on the selected setting and option 0 86017 -60- 200417167. It should also be noted that at the beginning of each telephone call, a number of variables can be initialized for use in the processes of Figs. For example, in the '-specific embodiment, the tandem bypass flag is set to FALSE, the pure delay sample counter is reset, and the tandem cable is reset' The ERLE counter is reset. These variables will be illustrated throughout the process of Figures 20-24. Same as m-some values are programmable or S1 line type into the echo canceller 20. For example, the measurement period_ is initialized to one at the beginning of each call: fixed value or fixed line to echo canceller_. It should be noted that the other variables described throughout the description can be initialized or fixed or programmed (permanently or not) into the echo canceller 20 at the beginning of each call. On the right, the decision diamond 483 decides to start the selective serialization of the call, and the flow enters the decision diamond 497. Selective stringing allows pure delay to be estimated at the beginning of a call. Because there is usually no conversation at call-on # ', the serial signal can be injected into Rin 43 to generate Rout 40 (see the serial signal 41 in Figure 2, which can be added by adder 36 / main input 1 ^ 1143). That is, if the appropriate 1 ^ 1143 energy is used, it is impossible to determine the pure delay, so the injection of the serial signal 41 can be used to determine the pure delay estimation. Generally, the tandem signal 41 is a short burst of lower energy injected before a telephone call begins a conversation. That is, the tandem signal 41 is generally smaller than the injection limit, which in a specific embodiment is in the range of -30 dBmO to -55 dBmO. Therefore, if the selective serialization is started, the flow enters the decision diamond 49 ?, which determines whether the serial bypass flag is TRUE. If so, the flow enters the decision diamond 484 of Fig. 21, bypasses the series together and continues the pure delay estimation of Fig. 21, as explained below. If the decision diamond 497 is determined and the tandem bypass flag is not set to TRUE, the mudway enters the decision diamond 499, where it is determined whether the tandem index is less than or equal to 86017 • 61- 200417167 2. The _column index ensures that the tandem signal (if used) is injected only at the beginning of the call. As mentioned above, the serial index can be reset at the beginning of the call, so the first time the decision diamond 499 is reached, the serial index should be less than or equal to 1 (because it was initially reset to zero). As will be explained below, the serial index will be incremented to one (for example, in block 505 of FIG. 21) after the first measurement period (300 milliseconds in a specific fact example). This still provides injection of the serial signal because the serial index is still less than or equal to one. However, after the subsequent measurement period, the serial index will increase to two (for example, in box 505 in FIG. 21). From the point of the decision diamond 499, the flow enters the decision diamond 484 in FIG. 21, and it is no longer possible to inject the serial signal 41. Because a serial index of 2 indicates that it is no longer considered the beginning of a call. It is often undesirable to inject a serial signal at a time other than the start of the call because it is audible to the parties to the call. If the diamond is being determined and the serial index is less than or equal to one, the flow proceeds to block 489, which indicates that it is still considered to be the start of the call. In block 4, calculate the long-term power of Sm (PSin) and Rin (pRin) (which can be done using the above formulas 1, 3 and 4). The process then proceeds to decision diamond 490, which determines whether Psin is less than

Psin限值及PRin是否小於一 PRin限值。第一項檢查(ρ^η是否 小於PSin限值)確保無近端通話器信號gjgen。一項具體實施 例中,PSin限值為_50 dBmO。第二項檢查(PRin是否小於pRin 限值)確保無遠端通話器信號。一項具體實施例中,限 值為-50 dBmO。若兩個狀況皆滿足,則流程進入方塊492, 表示對話尚未開始及串列信號可注入。因此,方塊492中注 入串列信號(例如圖2之串列信號41)或繼續注入(若此係第 二次通過方塊492)。然而,若在決定菱形490,兩個狀況皆 86017 -62- 200417167 未滿足,則流程進入方塊495,其中串列信號旗標設置為 TRUE。即,一旦psin或pRin超過各自的限值,不論串列索引 如何串列皆繞過(位於決定菱形497),從而防止串列信號在 田心乎Η過考王中注入。方塊495及492之後,流程進入圖 之決定菱形484。 圖21係執行純延遲估計之一項具體實施例。圖21之流程 使用子速率處理,以便僅每D個樣本進入流程,其中D對應 圖7之十選一取樣器1 〇6及11 〇。例如,一項具體實施例中D 為8,其中僅處理Rin44及Sin38之每第8個樣本。然而,替 代具體實施例中,D可為任何值(包括丨,其指示不使用子速 率處理,因為係處理每個樣本)。因此,每第13個樣本視為 子速率樣本。純延遲樣本計數器用以保持追蹤Rin 44&sin 38之進入樣本,以便捕獲每第D個樣本。通常,純延遲樣本 計數器在每一樣本後遞增,每第D個樣本重設。純延遲樣本 計數器亦可在每一電話呼叫之開始重設,如上所述。同樣 ’延遲樣本計數器可與本文說明的其他流程之樣本計數器 共用,或可為僅用於估計純延遲之特定計數器。 在決定菱形484’決定純延遲樣本計數器是否等於 應注意重設純延遲樣本計數器(即設置為零)之具體實施例 中’到達D-1對應到達第D個樣本。然而,替代具體實施例 中’純延遲樣本計數器可初始化為1,並以D而非d- 1檢查。 同樣’其他具體實施例可將純延遲樣本計數器初始化為D 或D_ 1且遞減直至其分別到達1或〇。因此,各種十進制濾波 器及十選一取樣器之具體實施例可用於圖7之十進制滤波 86017 -63- 200417167 器104及108及十選一取樣器106及11〇。應注意十選一取樣 為106之輸出係Rin 44之子速率樣本,其可稱為RhSR,十選 一取樣器110之輸出係Sin 38之子速率樣本,其可稱為 SinSR 〇 在決定菱形484,若決定純延遲樣本計數器尚未到達]〇-1 ’則流程進入方塊502,其中純延遲樣本計數器遞增一,且 流私進入圖9之方塊213。然而’若純延遲樣本計數器已到 達D-1 ’流程從決定菱形484進入方塊491,表示已到達子速 率樣本。方塊491中為偵測下一子速率樣本如上所述重設純 延遲樣本計數器。Psin limit and whether PRin is less than a PRin limit. The first check (whether ρ ^ η is less than the PSin limit) ensures that there is no near-end talker signal gjgen. In a specific embodiment, the PSin limit is _50 dBmO. The second check (whether PRin is less than the pRin limit) ensures that there is no far-end talker signal. In a specific embodiment, the limit is -50 dBmO. If both conditions are met, the flow proceeds to block 492, which indicates that the conversation has not yet started and serial signals can be injected. Therefore, the serial signal is injected into the block 492 (for example, the serial signal 41 of FIG. 2) or the injection is continued (if this is the second time through the block 492). However, if the diamond 490 is determined, and both conditions 86017 -62- 200417167 are not met, the flow proceeds to block 495, where the serial signal flag is set to TRUE. That is, once psin or pRin exceeds their respective limits, they are bypassed regardless of the serial index (located in the decision diamond 497), thereby preventing the serial signal from being injected into Tian Xinhu through the king. After blocks 495 and 492, the flow proceeds to the decision diamond 484 of the figure. FIG. 21 shows a specific embodiment for performing pure delay estimation. The flow of Fig. 21 uses sub-rate processing so that only every D samples enter the flow, where D corresponds to one of the ten samplers 10 and 11 of Fig. 7. For example, in a specific embodiment, D is 8, in which only every eighth sample of Rin44 and Sin38 is processed. However, in alternative embodiments, D may be any value (including 丨, which indicates that sub-rate processing is not used because each sample is processed). Therefore, every 13th sample is considered a sub-rate sample. The pure delay sample counter is used to keep track of incoming samples of Rin 44 & sin 38 in order to capture every D-th sample. Normally, the pure delay sample counter is incremented after each sample and reset every Dth sample. The pure delay sample counter can also be reset at the beginning of each telephone call, as described above. Similarly, the delay sample counter can be shared with the sample counters of other processes described herein, or it can be a specific counter used only to estimate pure delay. In the specific embodiment of determining the diamond 484 'to determine whether the pure delay sample counter is equal to the attention, it should be noted that the pure delay sample counter is reset (that is, set to zero). However, in an alternative embodiment, the 'pure delay sample counter may be initialized to 1 and checked with D instead of d-1. Similarly, the other specific embodiment may initialize the pure delay sample counter to D or D_1 and decrement it until it reaches 1 or 0, respectively. Therefore, various embodiments of the decimal filter and the ten-to-one sampler can be used for the decimal filter 86017 -63- 200417167 of Fig. 7 and the ten-to-one sampler 106 and 110. It should be noted that the output of one out of ten samples is a sub-rate sample of Rin 44, which can be called RhSR, and the output of ten out of one sampler 110 is a sub-rate sample of Sin 38, which can be called SinSR. In determining diamond 484, if It is determined that the pure delay sample counter has not yet arrived.] 0-1 ', the flow proceeds to block 502, where the pure delay sample counter is incremented by one, and the flow private enters block 213 in FIG. However, if the pure delay sample counter has reached D-1, the flow proceeds from decision diamond 484 to block 491, indicating that the sub-rate sample has been reached. The pure delay sample counter is reset as described above in block 491 for detecting the next sub-rate sample.

流程進入方塊485,其中決定子速率Rin之功率(pRinSR)、 子速率Sin之功率(PsinSR)及子速率近端通話器偵測旗標 (si*一near一end—detect—flag)。例如,下列公式可用於決定 pRinSR 、PsinSR及 P error SR(k)。 公式 16 · PRinSR(k)=(l- a)· PRinSR(k -1)+ α · RinSR2(k); 公式 17 : PSinSR(k)=(l- α)· PsinSR(k -i)+ α . SinSR2(k); 公式 18 ·· PerrorSR(k)=(i_a) .perr()rSR(k_l)+a .errorSR2(k) 應注意上述公式(公式16至18)中,k係信號子速率樣本數 ,例如使SinSR(k)= Sin(k · D)。公式18對應子速率錯誤,錯 u吳SR ’其對應SinSR及子速率回音估計之間的差異’ y(k), 其藉由圖7之子速率適應性濾波器122決定,以下將參考方 塊494說明。因此,err〇rSR(k)及Perr(>rSR(k)以下將詳細說明 。同樣,上述公式之一項具體實施例中,a設置為1/280, 其對應於電話通道中發現的人類語音統計,應注意1/280亦 86017 -64- 200417167 對應濾波器頻寬平均化的大約70毫秒之滑動窗。然而,替 代具體實施例可使用不同的阿伐值。(應注意上述子速率功 率計算可藉由圖7之功率估計器120及功率估計器118計算。) sr—near—end 一 detect 一 flag之決定可與以上參考圖η說明之 近端#號偵測同樣完成。因此,perr()rSR(k)及pSinSR(k)之最小 值與NESD子速率限值(NESD一SR—threshold)比較以決定是 否存在近端通話器信號(Sgen)。(應注意此可藉由圖7之近端 仏號偵測器114執行。)右是’則決定sr_near_end detect_flag 係正確並將其設置為TRUE。此旗標係用於繞過子速率濾波 器122之濾波器係數更新,因為若存在近端通話器信號,如 上所述,Sin 38不再係純殘餘回音之代表而係Sgen&殘餘回 音兩者的混合。因此,如以上參考適應性濾波器28所說明 ’子速率/慮波器122只應在SinSR僅包括子速率回音時調適 (即當近端通話器信號不存在時)。同樣,如以上參考適應性 濾波器28所說明,子速率濾波器122應在pRinSR高至足以防 止調適至通道雜訊時調適。 應注意如以上參考適應性濾波器28所說明,近端通話器 仏號可在單一對話及雙對話狀況中偵測。即,使用上述演 算法,Sgen可在僅存在一近端通話器或存在近端及遠端通 話器時偵測。亦應注意替代具體實施例可使用其他方法決 足近端通話器是否存在。例如,一項具體實施例可使用蓋 革演算法,其係熟知的偵測近端通話器信號技術。 方塊485後,流程進入決定菱形486,其中決定pRin⑽是否 大於子速率Rin的最小功率限值。若否,則流程進入圖9之 86017 -65- 200417167 方塊213,繞過子速率適應性濾波器122之更新。如上所述 ,此防止子速率適應性濾波器122調適至通道雜訊。一項具 體實施例中子速率Rin的最小功率限值設置為-45 dBmO。若 滿足最小功率限值,流程進入決定菱形487,其中決定 sr—near_end_detect_flag是否係FALSE。若未滿足最小限值 ,則流程進入圖9之方塊213,如前文所述,由於存在近端 通話器信號故繞過子速率適應性濾波器122之更新。若 sr_near_end—detect_flag 係 FALSE,流程進入方塊494,其指 示Prusr係足夠且不存在近端通話器信號。 方塊494中,計算子速率回音估計y(k),接著在方塊496 中,更新子速率適應性濾波器122之係數。一項具體實施例 中,一修改NLMS演算法(修改係用於子速率方法中)可用以 計算y(k)及更新係數。 公式 19 : y(k)= XT(k)· H(k) 上述公式19代表輸入信號X之濾波,其中X(k)=[x(k),x(k -1),…,x(k - N +1)疒係延伸於FIR濾波器範圍持續時間上 的輸入信號向量(子速率D時)。因此,x(n)= RinSR(n)。同樣 ,公式19中,H(k)係用於第k個疊代之濾波器係數向量(子速 率取樣時),其中: 公式 20 : H(k) = [h〇(k),hi(k),…,hN-Kk)]1 公式 21 : H(k +1) = H(k) + step一size · errorSR(k)· X(k) 上述公式21代表根據NLMS演算法之濾波器係數更新公 式,其中NLMS子速率step—size可如下表示。 公式 22 : step—size = β/[γ + PRinSR(k)] 86017 -66- 200417167 公式22中,^調適常數,丫係「保護」期,其確保當pRinSR(k) 暫時變小時調適公式中的更新期不會過大,且其中匕⑽“幻 係子速率取樣時的輸入信號功率(見公式16)。 公式23 : errorSR(k) = SinSR(k) - y(k)(子速率時調適錯誤) 上述公式中,RinSR對應濾波及十選一取樣之遠端信號 (其對應圖7之十選一取樣器1〇6的輸出),而RinSR對應濾波 及十選一取樣之回音信號(位於圖7之十選一取樣器1〇6之 輸出)。應注意在Sgeri不存在時,Sin 38只包括殘餘回音, 因此位於十選一取樣器110之輸出的以“尺可用作濾波及十 選一取樣之回音信號。變數H(參考圖19說明)對應代表子速 率適應性滤波器122之係數估計的列向量,η之後的「τ」指 不向量換位。信號y代表藉由適應性濾波器122提供之SinSR 估計,錯誤SR係SinSR及y之間的差異。同樣,上述公式一 項具體實施例中,β設置為2·9*2·5,而α為1/128。一項具體 實施例中,γ設置為一較小值(相對於pRinSR⑻)。例如,若 PRinSR(k)以16位元元分數代表,y通常值係k · 2-n,其中k 為小整數。 流程接著進入決定菱形498,其中決定η是否等於N,其中 在當前具體實施例中,Ν對應單一測量週期之持續時間。一 項具體實施例中,Ν對應300 ms,因此對應300子速率樣本( 假定D=8)。例如,若信號(例如Rin 44及8111 38)以8 kHz速率 取樣’則每隔125毫秒接收樣本。當前具體實施例中,d為8 ’因此每第D個樣本對應8*125微秒,等於1毫秒。因此,每 隔N個子速率樣本,流程進入方塊5〇3、5〇〇及501,其中在 86017 -67- 200417167 當前具體實施例中N為300,使3〇〇*1毫秒等於300毫秒。因 此’N可定義為具有預定持續時間之時間窗或子速率樣本之 預定數量,其必須先於在方塊5〇〇及5〇1決定估計延遲處理 。N值可編程或固線式到回音消除器2〇内,可為任何值,取 決於計算新估計延遲值所需的頻率。應注意N對應用於子速 率適應性濾波器122之會聚時間(即短期會聚時間)。例如, 若1024樣本之窗(其在當前具體實施例中對應1〇24*125微秒 ,其等於128微秒之窗尺寸,假定基本取樣速率為8 ]^1^)用 於捕獲脈衝回應(例如圖37之T3),則採用1024/D子速率樣本 (例如在當前具體實施例中1024/8 = 128子速率樣本)。即, 當前具體實施例使300 ms之會聚時間可實現通道子速率脈 衝回應之128子速率樣本值(如回音消除器之Rin>eSin終止端 所見)並發現其最大值。儘管如上所述,但在替代具體實施 例中可使用不同會聚時間(即不同尺寸測量週期N)、不同窗 尺寸(即不限於1024基本速率樣本或128毫秒)、不同子速率( 其中D可為任何值,包括1)及不同於8 kHz之取樣速率。 若在決定菱形498,決定索引η(其可在呼叫開始初始化為 初始值,例如1或0)尚未到達Ν,流程進入方塊502,其中η 遞增,流程繼續至圖9之方塊213。然而,若在決定菱形498 ,決定η等於Ν,表示已處理300個樣本(對應300毫秒之持續 時間),流程進入方塊503,其中η初始化為1,其他測量週 期變數亦初始化(例如 PRinSR、PSinSR、sr—near—end_detect—flag 等等)。流程接著進入決定菱形504,其中決定串列索引是 否為2。若是,流程繞過方塊505進入方塊500。然而,若串 86017 -68- 200417167 列索引並非2,流程進入方塊505,其中串列索引遞增。如 以上參考圖20所說明,藉由選擇性串列模式使用串列索引 ’其中串列信號僅在電話呼叫之開始注入。因此,串列索 引用於指示電話呼叫之開始。 流程接著從方塊505或決定菱形5 04進入方塊500,其中計 算單獨估計純延遲。應注意,單獨估計純延遲對應每個測 量週期估計之純延遲(即用於每N個子速率樣本),其將參考 圖22詳細說明。估計單獨純延遲後,流程進入方塊5〇 1 ,其 中使用幾個(2、3或更多,取決於特定實施以及取決於呼叫 階段)有效單獨純延遲估計,決定估計延遲13 〇 ,其將參考 圖2 3所詳細說明。 圖22說明圖21之方塊500的一項具體實施例,其中決定單 獨估計延遲。流程始於方塊506,其中決定子速率回音返回 損失增強(SR一ERLE)。下列公式可用於決定sr_eRLE : 公式 24 ·· SR—ERLE(k) = 10* l〇gl0(PsinSR⑻/ p⑽⑽⑻) 因此SR—ERLE對應PsinSR及PerrorSR之間的比率,其用於驗 證純延遲測量。SR一ERLE提供關於子速率適應性濾波器122 之會聚「良好」的資訊(即已消除多少回音)。即較高 SR一ERLE(例如5 dB或更多)指示在當前測量週期内適應性 濾波器122已充分會聚。(應注意可藉由在給定子速率操作 之ERLE估計器116決定SR 一 ERLE,見圖7。)因此,方塊5〇6 後’流程進入決定菱形508,其中SR 一 ERLE與子速率ERLE 限值比較,若其不大於此限值,流程進入方塊514,表示由 於SR一ERLE不足不應使用當前測量週期。因此,放棄當前 86017 -69- 200417167 測量(用於當前測量週期)且流程進入圖21之方塊501。然而 ,若SR_ERLE超過子速率ERLE限值,則流程進入方塊510 ,其對子速率適應性濾波器122之會聚執行另一檢查。 方塊510中,決定子速率適應性濾波器122係數之峰值對 平均值比率(PAR)。參考圖37,峰值對應㈣最大值(意味著峰 · 值係零軸正或負方向上的最大距離)。圖37峰值如標誌所表 _ 示。平均值使用子速率適應性濾波器係數之絕對值計算。 ’ 若PAR不大於PAR-Threshold,則流程從決定菱形512進入方 _ 塊514,其中放棄當前測量,因為當前測量週期未提供適當 的子速率適應性濾波器122之會聚。然而,若PAR大於 PAR—Threshold,流程進入方塊516,表示為確保子速率適應 性濾波器在當前測量週期中充分會聚而滿足兩種狀況。方 塊516中子速率適應性濾波器122係數最大值(對應峰值)及 其對應時間值(圖37中T峰值)定位(其可藉由圖7之最大值定 位器124執行)。接著流程進入圖21之方塊501,其在圖23中 詳細說明。 圖23係圖21之方塊501的一項具體實施例,其決定純延遲 _ 估計(對應圖7之延遲決定126及估計延遲130)。如上所述, 純延遲通常在呼叫開始估計,若滿足特定狀況可在呼叫中 間改變。通常在呼叫中間改變純延遲估計之狀況較保守, 因為(a)電話呼叫(PSTN呼叫及封包電話呼叫)之統計指示純 延遲不會在呼叫中間很頻繁改變,以及(b)從電話使用者觀 點過於頻繁(藉由過於接近追蹤之)改變純延遲估計可係破 壞性。因此,流程始於決定菱形528,其中決定此是否係第 86017 -70· 200417167 /人,過孩泥程(即表示電話呼叫之開始)或先前估計延遲 疋否等於零(其可對應呼叫之開始或先前估計延遲值為零 之呼Η的中間)。若係這兩種情形之—,流程進人決定菱形 、其中決疋兩種有效測量是否可用。如以上參考圖22所 說明,每個單獨估計延遲使用sr—erle&par兩者驗證,只 有驗證單獨估計延遲係儲存之對應延遲測量。因此,每個 測裏:週期(當前具體實施例中係每3〇〇毫秒)存在獲得另一有 效測K可能性。假定至少有兩種可用(其至少採用兩個測 量週期獲得),流程進入方塊53〇 ,其中估計延遲之一「快 速追蹤」計算始於方塊53〇。 方塊530中’第一緩衝器填充兩個連續有效測量。流程進 入方塊5 3 2 ’其中採用這兩個測量及兩個測量平均值之間的 分散。例如分散可為兩個測量之間的差異。流程進入決定 菱形534,其中決定分散是否小於分散限值以及平均值是否 大於平均值限值1。若否,則不計算新估計延遲且流程進入 圖9之方塊213。然而,若滿足這些狀況,流程繼續至方塊 542 ’其中計算新估計延遲。因此,分散限值1及平均值限 值1確保僅在兩個測量之間足夠一直時計算新估計延遲。換 了之’若隨後的脈衝回應到達其最大值之時間測量差異過 大’延遲估計暫停直至隨後測量更一致(即彼此更接近)。方 塊542中,下列公式可用於計算新估計延遲: 公式25 :新估計延遲=平均值·偏移 上述公式中,平均值對應方塊532中兩個測量採用之平均 值’偏移係對應在實質回應開始之脈衝回應内到達峰值前 -71- 86017 200417167 的時間量值。即,參考圖37,峰值對應藉由T4數量大於ΤΙ (純延遲)之時間。因此,Τ4必須從峰值時間(τ峰值)值中減 去。偏移對應此Τ4值,且偏移可使用關於該區域内出現之 不同但典型的併合電路脈衝回應之統計資訊決定並可編程 到回音消除器20内。接著新估計延遲(對應估計延遲13〇)應 用於方塊544内。例如,應用估計延遲13〇可對應啟動圖4之 選擇性延遲方塊66,其係適應性濾波器單元μ的一項具體 實施例。因此,藉由使用純延遲估計,減少了適應性濾波 器單元28品要的滤波器分接數量,因為用於回應純延遲部 分之係數可視為零。 應注意替代具體實施例在決定菱形529可需要多於或少 於兩個的測量,以繼續「快速追蹤」計算。一項具體實施 例中,只需要一個有效測量,此情形中,不計算分散及平 均值(因為只使用一個測量)。同樣,因此實際值可在決定是 否進入方塊542前檢查平均值限值i,而分散比較則不需要 。需要多於兩個有效測量之一替代具體實施例中,分散可 對應有效測量所採用之方差。因此,替代具體實施例可需 要任何數量之有效測量。 若在決定菱形528,決定此非第一次經過該呼叫(通常即 表示在呼叫中間執行純延遲估計)且先前延遲估計非零,流 程進入決定菱形535,其中決定M個有效測量是否可用。一U 項具體實施财,M選擇為3、或4、或5(取決於回音消除器 安裝器選擇之特定設置)。M值可選擇成在可能更新(即改 變)當前估計延遲值前需要更多或更少之測量。顺越高, 86017 -72- 200417167 流程越少進入方塊536。因此,Μ可選擇為任何值,並不限 於3至5。若Μ個有效測量不可用,流程進入圖9之方塊213 ’繞過改變估計延遲值之可能性。然而,若Μ個有效測量 可用,流程進入方塊536,其中第二緩衝器填充μ個連續有 效測量。 方塊538中,計算平均值及先前平均值之間的分散、平均 值及差異。如上所述,分散可以各種方法計算。例如,若 Μ僅為2,分散可簡單地係一差異。或者,分散可作為一變 化計算。先前平均值對應先前經過方塊538或532時計算之 平均值。方塊538之計算後,流程進入決定菱形54〇,其中 使用各種限值決定是否值得改變估計延遲。因此,決定菱 形540之限值可用於建立更多對話標準,用以在呼叫中間改 變估計純延遲。 在決定菱形540,分散與分散限值2比較,平均值與平均 值限值2比較,平均值及先前平均值之間的差異與差異限值 比較。若分散小於分散限值2,或平均值大於平均值限值2 ’或若差異小於差異限值,流程進入圖9之方塊213,並不 計算新估計延遲(即保持當前估計延遲)。然而,若這些狀況 全部滿足(分散小於分散限值2,平均值大於平均值限值2 , 且差異大於差異限值),則流程進入方塊542,其中計算新 估計延遲(如參考公式25所解釋)並將其應用於方塊544,如 上所述。使用「快速追蹤」,分散限值2確保Μ個有效測量 不會彼此偏離過多,且平均值確保Μ個有效測量大至足以 保邊改變其的需要(例如若平均值相對較小,可無需改變回 86017 •73- 200417167 音消除器之純延遲,小純延遲若正確提供可藉由適應性滤 波器28調節)。差異及差異限值之比較防止若差異過小(即小 於差異限值)並因此不值得改變時當前估計延遲改變。 圖24說明可用於藉由回音消除器2〇減少MIPS(每秒百萬 個指令,數位信號處理器使用之通常標準)之選擇性監測模 式的一項具體實施例。圖24之流程為圖9之211的一部分, 其可用於決定何時執行圖21之流程。流程始於方塊518,其 中片异回涂返回抽失增強(echo return loss enhancement ; ERLE)。ERLE對應適應性濾波器28之會聚的「良好」(即提 供關於有多少回音未藉由適應性濾波器28實際消除之資 訊)。下列公式可用於計算ERLE : 公式 26 : ERLE(n) = 1〇* i〇gl〇(Psin⑻/ p⑽r⑻) ERLE因此對應PSin及perr〇r之間的比率,其中讀樣本數。 (應注意Psin及Perror可使用上述公式1及2計算。)此ERLE值因 此係在用以進入圖21之純延遲調整方法的監測模式中使用 。流程進入決定菱形520,其中ERLE與一 ERLE限值比較。 若ERLE大於或等於ERLE限值,則適應性濾波器28之會聚足 夠且不需要執行純延遲估計,流程進入圖9之方塊213。然 而,若ERLE小於限值,則適應性濾波器28之會聚不足,流 程進入方塊521,其中ERLE計數器遞增。(應注意ERLE計數 洛可在母個呼叫開始初始化。)流程接著進入決定菱形523 ’其中ERLE計數器與ERLE計數器限值比較。若ERLE計數 器尚未到達ERLE計數器限值,流程繞過方塊522(對應圖21 之流程)並進入圖9之方塊213。然而,若ERLE計數器已到達 86017 -74- 200417167 ERLE計數器限值,流程進入方塊522,其中執行圖21之整 個流程(如上所述)。流程接著進入方塊524,其中重設ERLE 計數器,然後流程進入圖9之方塊213。 ERLE計數器及ERLE計數器限值確保若方塊518内計算之 ERLE係邊框(從上述ERLE限值改變至ERLE限值以下發生 過於頻繁),純延遲不會得以重新計算及更新。即,可進入 圖21之流程前ERLE必須降至ERLE限值以下一段時間(由 ERLE計數器及ERLE計數器限值控制)。此有助於防止純延 遲估計快速及不合需要之改變。 圖8及25至27係關於音頻偵測之一項具體實施例,其可用 於回音消除器20内,其中圖8以方塊圖形式說明監測及控制 單元30的一部分,圖25至27以流程圖形式說明圖9之方塊 209的一部分。當至少回音消除器2〇輸入(例如Rin 44或sin 38)之一係音頻時,適應性滤波器62之穩定性可受影響,導 致電訊網路中不合需要的失真及服務品質下降。音頻係由 一些在特定時間段内具有恒定數值、頻率及相位之正弦組 件組成的信號。 任何嘗試將殘餘回音之平均功率減至最小的適應性演算 法(例如由適應性濾波器62使用)會具有取決於Rin 44之自 相關性矩陣的動態行為。特定類別的接收路徑信號可使此 矩陣為單數’其可暫時破壞適應性方法,使適應性濾波器 62之濾波器係數偏離需要的值。例如正弦信號(單一頻率音 頻)可產生此狀況。此情形中,正弦信號Rin(n) =Acos(i2n+沴) 之自相關性r(k)藉由r(k) = A2cos(Qk)/2提供,其大多數實際 86017 -75- 200417167 情形中導致單數自相關性矩陣(即當其尺寸很大時)。此時, 適應性演算法之可能結果係-組正弦形式滤波器係數(用 於適應性濾波器62),其係實際併合電路脈衝回應之錯誤估 計,圖37提供其範例。 同樣,多頻率音頻亦可產生相似問題,因為當組件數撾不 夠大或矩陣具有大尺寸時他們的自相關性〜 仍然可產生單數自相關性矩陣。應注意矩陣尺寸取決於用 以估計併合電路脈衝回應之濾波器係數數量。因此,需要 偵測任何發信號及控制音頻之存在,然後終止適應性濾波 器62之調適方法,從而防止從一組良好濾波器係數發散。 將參考圖25至27說明之一項具體實施例使用多項式濾波 器,例如用於指示任何頻率正弦信號存在的Teager_Kaisef 濾波器之修改版本,用於識別預定單一頻率音頻之平滑相 關性方法,以及用於可靠偵測音頻之決定邏輯。應注意任 何適當的多項式滤波器皆可使用。圖8内多項式滤波器即為 一範例。儘管本文說明之具體實施例通常係參考回音消除 器20,但他們可用於任何需要音頻指示及偵測的裝置或電 訊裝置,並不只限於回音消除器。 圖8包括功率估計器134的一項具體實施例,其藉由修改 能量操作器將任何單一頻率音頻映射至一常數。即,單一 頻率音頻可表示如下。 公式 27 : x(n)= Acos(Qn +多) 修改能量操作器Tk可表示如下。 公式 28 : ⑻)=X2(n一灸)一一2灸)sin2(ΑΩ) 86017 -76- 200417167 上述公式中,應注意x2(n - k) - x(n)x(n -2k)對應於圖8内 加法器144之輸出(即延遲136之輸出為x(n - k),延遲138之 輸出為x(n - 2k),乘法器140之輸出為x(n)x(n - 2k),乘法器 142之輸出為x2(n - k),加法器144之輸出係乘法器i42之輸 出及乘法器140之輸出的負數之和)。應注意輸入信號χ(η) 可對應Rin 44或Sin 38。此外,將公式27之χ(η)代入x2(n - k)-x(n)x(n - 2k),即得到結果A2sin2(kD)。因此應注意Ψ取決於 數值Α及音頻正規化頻率ω(Ω = 2πί/[,其中f係音頻頻率, fs係取樣頻率,一項具體實施例中其為8 kHz)。這些公式中 的參數k定義基本子速率處理,其中k可為任何整數值,包 括1。因此,在取樣速率fs應用Vk等於在取樣速率fs/k應用Ψ1 。如上所述,子速率處理可用於減少計算要求,其中僅處 理每第k個樣本。應注意ψ]<:(χ(η))並不取決於初始相位0,而 是根據陡峭相位改變產生短期瞬時,其可用於偵測通信信 號χ(η)内的相位改變。 x(n)功率(公式27)可使用下列公式表示。 公式 29 : Powerx⑷=A2/2 因此,應注意Ψ1<:(χ(η))提供藉由2sin2(kD)縮放的χ(η)之功 率,使得: 公式 30 : Ψ1<:(χ(η)) = Powerx(n)*2sin2(kQ) 因此根據Vk(x(n))解Powerx⑷提供下列公式: 公式 31 : P〇werx⑷=Ψ1<:(χ(η))〇8(:2(1<:Ω)/2 然而,實務中,信號x(n)(如上所述其可對應圖8說明之具 體實施例内Rin 44或Sin 3 8)可受雜訊毀損,產生雜訊估計ψ 86017 -77- 200417167 雜訊k(x(n))。然後任何低通濾波器可用於使結果平滑,例如 單極低通濾波器。因此,如圖8所見,功率估計器丨34包括 接收數值146之輸出(對應加法器144輸出的絕對值)及來自 儲存器150之a的低通漉波器,並提供ψ雜訊之平滑估 計P(n)。P(n)可表示為以下公式: · 公式 32 ·· - 1)+(1-ψ2(«一一, 上述公式中,a為控制平滑低通濾波器之頻寬的平滑參數 · (〇<a<l)。應注意可使用固定或可變平滑參數接著ρ(η) φ 提供至圖8之音頻指示決定單元166,其根據估計p(n)之方差 指示音頻是否存在,以下將參考圖26詳細說明。儘管圖26 係指功率,可使用通信信號其他功能,例如相關性(見圖27) ,甚或通信信號本身。 一旦存在一音頻,一項具體實施例偵測任何帶或不帶相 位反轉之預定單一頻率音頻,例如2100 Hz發信號音頻。偵 測預定音頻之一項具體實施例以下會參考圖27詳細說明。 因此一項具體實施例可僅包括圖26之音頻偵測,而替代具 體實施例,如圖25所示。包括圖26及27的演算法之間的互參 動。此外,圖26之具體實施例亦可用於監測模式,以便接 收音頻後重新啟動適應性濾波器62之適應性方法。即發信 號音頻及語音信號之間的轉化亦可使用P(n)方差偵測(即當 方差大於某預定限值時偵測轉換)。 根據圖26之流程給定估計p(n)、音頻指示決定單元166可 用於偵測音頻。圖26之泥程偵測p(n)方差較小之時間間隔。 無論何時x(n)上出現單一頻率音頻皆期望對應p(n) 一小方 86017 •78- 200417167 差的P(n)(恒足位準。若音頻係由多個頻率組成,p(n)方差 將增加’但平均位準將保持恒定。因此,根據方差位準可 指示單一或多頻率音頻。圖26中流程因此始於方塊588 ,其 中k、a、m、r、Plow及Mmin設置為需要值。根據期望音頻頻 率範圍及系統内雜訊位準,這些值可係例如k = 2、a = 〇.9 、m = 1、r = 〇·95、PlQw = 2-8。Nmin取決於取樣速率及偵測 音頻之最小需要持續時間。流程進入決定菱形59〇,其中決 定P(n)是否大於PlQW,其中Piqw對應指示最低信號位準(將視 為)的限值。若否,流程進入方塊598,其中偵測計數器重 設(為零)’接著進入方塊6〇4,指示音頻未偵測,然後進入 圖25之方塊554。然而,若P(n)至少大於Pl()w,流程從決定菱 形590進入方塊592,其中計算Pmin及Pmax。Pmin對應由m個樣 本分隔之P(n)的兩個估計之最小值,而Pmax對應由m個樣本 分隔之P(n)的兩個估計之最大值。 公式 33 : Pmin = MIN(P(n),P(n - m)) 公式 34 : Pmax = MAX(P(n),P(n - m)) 方差位準藉由比較Pmin及Pmax估計。因此,流程進入決定 菱形594,其中Pmil^ Pmax之比率(即Pmin/Pmax)與音頻指示限 值比較。若其不大於音頻指示限值r,流程進入方塊598, 其中重設偵測計數器,接著進入指示音頻未 >(貞測之方塊604 ’然後進入圖25之方塊554。然而,若Pmin/Pmax大於音頻指 示限值,則P(n)視為足夠恒定(即Pmin及Pmax足夠接近),指示 存在音頻之可能性。此情形中,流程進入方塊596 ,其中 貞 測計數器遞增(應注意偵測計數器可在呼叫開始或在進入 86017 -79- 200417167 圖26之流程前的任何其他適當時間初始化或重設)。 流程進入決定菱形600,其中決定偵測計數器是否大於 Nmin。若偵測計數器尚未到達,則流程進入指示音頻未 偵測之方塊604,然後進入圖25之方塊554。然而,若偵測 計數器大於Nmin,流程進入方塊6〇2,其中偵測音頻(其與圖 . 8内音頻指示器信號168之判定一致)。流程接著進入圖25之 _ 方塊554。因此,當p(n)大於最小值位準(Piqw),p(n)方差小 於最小值(關於音頻指示限值),以及偵測計數器大於最小值鲁 (Nmin)時偵測音頻。偵測計數器確保偵測音頻及判定音頻指 示器信號168前音頻已存在至少一特定數量時間(對應]^_) 。此有助於防止偵測音頻及不偵測音頻之間的快速交換, 其可導致適應性濾波器62之適應性方法過於頻繁地啟動或 關閉。 圖8包括平滑相關器152之一項具體實施例。此相關器可 以各種方法使用’包括任何預定單一頻率音頻之偵測,振 幅調變器信號載波之偵測,頻率接近標稱頻率之多組件音 頻的偵測。平滑相關器152接收輸入信號χ(η)樣本(如上所述 * 其可為Rin 44或Sin 38)及來自儲存器150的三個控制參數卜 、b及e)並產生兩個相關性估計。這些相關性用 於指示預定音頻之存在,如以下將要說明。控制參數c定義 一第二順序數位振盛器w(n)之係數之一,其產生具有正規 化頻率= 2wfd/fs的預定單一頻率音頻,其中fs如上係輸入 取樣頻率。振蘆器狀態初始化為w(-l) = 1及w(-2) = c = cos(Qd),並使用由 w(n) = 2* c * w(n - 1)- w(n _ 2)提供之標 86017 -80- 200417167 準第二順序數位振盪器。(應注意振盪器可對應圖8之振盪 器164 ’接收c並將w(n)作為輸出提供至乘法器156及158。) 輸入仏號x(n)及延遲版本x(n _ e)(即圖$之延遲I”的輸出) 與w(n)相關(藉由乘法器156及158)然後通過低通濾波器(即 圖8之低通濾波器160接收乘法器ι58之輸出,其可用 x(n)w(n)代表,而圖8之低通濾波器ι62接收乘法器156之輸 出,其可用x(n-e)w(n)代表)。參數b作為輸入提供至低通濾 波器160及162,其中〇<b<l定義低通濾波器之頻寬。同樣 ,平滑相關器152的一項具體實施例可使用平滑單極低通濾 波器作為低通滤波器160及162。同樣,一替代具體實施例 中,振盪器信號w(n)及延遲版本χ(η _ e)可與χ(η)相關,而非 將w(n)與χ(η)及χ(η - e)相關。同樣,一項具體實施例中,狂 係如下表示之延遲因數。 公式 35 : e = 2Ω^ 上述公式對應接近90。之相位差異,其中|V|表示大於或等 於其引數X之最小整數。 再參考圖8,低通濾波器160之輸出係相關性估計尺^…而 低通濾波器162之輸出係相關性估計Rjn),兩者皆提供至音 頻指示決定單元166。仏⑻及心⑻可表示為以⑻=b · R〇(n -1) + (1- b) · w(n) · x(n),以及RKn) = b · RKn -i) + b) · w(n) · x(n - e)。因此,若未知音頻已由音頻指示決定單元 (使用上述圖26之流程)指示,(η)使用圖27之流程 分析,用以識別預定單一頻率音頻之存在(對應振盪器164)。 86017 -81- 200417167 為偵測特定音頻圖27之流程將偵測音頻與預定單一頻率 音頻相關。圖27中,流程始於方塊6〇6,其中c、e、b、u、 q及Mmin設置為需要值。參數直接與偵測之目標音頻的頻率 相關’其亦定義延遲值e。根據系統内雜訊位準,剩餘值可 係例如 b = (K9、u = 1、q = 〇.95、P1()w = 2·8。Mmin 取決於取 樣速率及偵測目標音頻之最小需要持續時間。流程進入方 塊608 ’其中評估R(n)、Rmh^Rmax,如以下公式所示。 公式36:外到々(4W4) 公式 37 ·· Rmin = MIN(R(n),R(n _ u)) 公式 38 : Rmax = MAX(R(n),R(n _ u)) R(n)指之間的峰值數值相關性。對應由u 個樣本分隔之R(n)的兩個估計之最小值,而對應由^個 樣本分隔之R(n)的兩個估計之最大值。流程接著進入決定 菱形610,其中Rmi3+Rmax比率(Rmin/Rmax)與相關性限值“其 在一項具體實施例中設置為〇·95)比較。若比率不大於相關 性限值,流程進入方塊610,其中重設相關性計數器(為零) ,接著進入方塊618,表示未偵測預定頻率(Dr = 〇),然後進 入圖25之方塊560。然而,若比率大於限值,流程進入方塊 612,其中相關性計數器遞增。(應注意相關性計數器可在 每個呼叫開始初始化或重設。)流程進入決定菱形614,其 中相關性計數器檢查Mmin。若相關性計數器不大於Mmin,流 程進入方塊618,表示未偵測預定義頻率(Dr = 〇)。 然而’若在決定菱形614,決定相關性計數器是否大於 Mmin ’流程進入決定菱形620,其中決定r⑻是否等於R〇⑻ 86017 -82 - 200417167 絕對值。若是,流程進入方塊622,其中使用尺奴…符號偵測 預定義頻率,即Dr = sigr^R〆!!))。若否,流程進入方塊624 ’其中使用R!(n)符號偵測預定義頻率,即Dr = sigj^Rjn)) 。流程從方塊622或624進入圖25之方塊560。因此,與圖26 說明之用以偵測任何音頻的流程一樣,當用於藉由相關性 計數器及Mmin定義之預定數量時間的R(n)方差很小時偵測 預定義音頻。此有助於防止如上所述關於偵測計數器及Nmin 之快速交換。圖27之方法等於使用藉由下列公式給定之有 效平滑相關性: 公式39 :尤#(«)=1/2^(+式(咖⑷一。(+尺碰 上述公式根據最大數值組件產生。 圖25說明包括圖26及27流程的總體方法流程之一項具體 實施例’其中圖25根據一項具體實施例說明圖9之方塊209 的一部分。圖25中,流程始於方塊550,其中最小計數器值 (Lmin-p及 Lmin_n)係分別選擇用於 Dpositive(Dp)及 Dnegative(Dn) 〇這 些值係選擇以滿足需要的正負相位最小持續時間。對應 於正相位計數器而Dn對應於負相位計數器。 流程接著進入方塊522,其中偵測用於任何單一頻率音頻 之搜尋。圖26之流程可用於決定任何單一頻率音頻之存在 。流程進入決定菱形554,其中若未偵測到音頻,流程進入 方塊558,其中Dp及Dn計數器重設(為零)且流程進入方塊582 ,表示音頻未偵測,接著進入圖9之方塊211。然而,若偵 測一音頻,流程進入方塊5 5 6,其中偵測音頻與預定單一頻 率音頻相關。因此,圖27之流程可用於執行方塊5 5 6。流程 86017 -83- 200417167 進入決疋菱形560,其中決定Dr是否為零。若是,預定頻率 並非在方塊556決定(例如圖27之方塊618),流程進入方塊 558,其中重設計數器Dp及Dn。然而若否,流程進入決定菱 形562,其中決定Dr是否大於零。若是,流程進入方塊兄4 ,其中正相位計數器遞增;否則流程進入方塊566,其中負 相位計數器遞增。 方塊564或566後,流程經過點g進入方塊568,其中 Flagpositive(Fp)及Flagnegative(Fn)重設(為零)。流程進入決定菱 形570,其中若Dp大於Lmin.p,Fp在方塊572設置為一,否則 流程繞過方塊572進入決定菱形574。決定菱形574決定Dn* 否大於Lmin-n ’若是’ Fn在方塊576設置為一。若否,流程繞 過方塊576進入決定菱形578。在決定菱形578,若Fp及Fn* 零(即若FP+Fn為零),流程進入方塊582,表示音頻未偵測。 即,若無計數器(Dn或Dp)大於某最小值(例如分別為Lmin-p或 Lmin-n),貝U未偵測需要音頻。 然而,若Fp+Fn不為零,流程進入表示偵測音頻之決定菱 形580。若僅有一計數器大於Lmin(Dp或Dn)則Fp + Fnf會大於 一,流程進入方塊584,表示不用相關性符號反轉偵測需要 之音頻。若Dp及Dn皆大於各自Lmin,流程進入方塊586,表 示使用相關性符號反轉偵測需要之音頻。若R(n)平均位準 在相關性符號反轉過程中相同,則指示相位反轉。因此, 圖25之流程組合圖26及27之流程並偵測相位反轉。一替代 具體實施例藉由偵測P(n)陡峭改變在一給定單一頻率音頻 内識別相位改變(不必為180。)。 -84 - 86017 200417167 應注意直至此點的說明已假定適應性滤波器單元28内不 存在非適應性濾波器64(見圖4),因此任何適應性濾波器28 之係數或分接的參考與參考適應性濾波器單元28内適應性 濾波器62相似。因此在先前說明中,不必與適應性濾波器 單元28分離地參考適應性濾波器62。然而,以下圖28至36 之說明中,非適應性濾波器64可存在並視為適應性濾波器 單元28之一部分。因此,適應性濾波器62之係數,如在整 個上述說明中所使用,由於適應性濾波器單元28可包括各 種不同濾波器(例如適應性濾波器62及非適應性濾波器64) 之組合,現在將更具體稱為適應性濾波器62之係數或分接。 如上所述,適應性濾波器62追蹤由併合16引入之回音, 從而通常需要大量分接。例如,為追縱圖37之整個脈衝回 應,適應性濾波器單元28之適應性濾波器62(假定取樣速率 為8 kHz)需要256個分接,其跨越32毫秒,從而覆蓋整個脈 衝回應。隨適應性濾波器62分接數量增加,計算複雜性增 加且通常降低會聚速度。上述參考圖2〇至24之方法提供純 延遲债測,以便使適應性濾波器62使用純延遲後覆蓋脈衝 回應之稀疏窗。以下參考圖28至36說明之方法係關於縮短 回音路徑範圍之機制。即,除偵測微調純延遲外,亦偵測 及塵縮分散時間,以便縮短脈衝回應之回音路徑範圍。如 將要說明,一項具體實施例為縮短將殘餘回音減至最小所 需有效为接數f之目的加入固定或適應性遽波器。 如圖37所說明,脈衝回應實為零及極點。零防止對應頻 率回應,而極點增強對應頻率回應。因此,藉由加入濾波 -85- 86017 200417167 器或補傷極點之滤波器’可壓縮脈衝回應從而需要較少數 量分接。例如,假定IIR濾波器具有由比率b(z)/a(z)代表之 傳送函數H(z),濾波器A,(z)可設計成補償H(z)之極點,使 H(z)* A’(z>B(z)。圖2說明之一項具體實施例使用選擇性非 適應性滤波器3 1及35,使非選擇性濾波器3丨之輸出(即sin 39)等於與非適應性滤波器3 1卷積之回音。然而,緊跟 凹口波〉慮波益4 5之非適應性滤波器3 1的存在將失真引入需 要補傾之Sin 37。因此’非適應性滤波器35可引入接收錯誤 信號46,並產生濾波錯誤信號47。假定非適應性濾波器31 係具有傳送函數A’(z)之FIR濾波器,非適應性濾波器35係具 有傳送函數1/A,⑺之反轉IIR濾波器。然而,A,⑻需要限制 ,因為FIR濾波器31之A,(z)的零成為反轉IIR濾波器35之 1/A’(z)的極點。這些A’(z)之零的限制以下將進一步說明, 其防止非適應性IIR濾波器35之極點放大錯誤信號47。 替代具體實施例可使用非適應性濾波器之不同配置。例 如’非適應性濾波器35並不置於加法器34之輸出,而是置 於加法器34前位於非適應性濾波器31及適應性濾波器62之 輸出(其可產生相同網路效應)。此具體實施例中,緊接非適 應性濾波器35之非適應性濾波器3 1可有效消除回音,使得 Sin 38及Sin 39之間不需要濾波器(即Sin 39及Sin 38相等)。 接著適應性濾波器28可設計成包括選擇性非適應性濾波器 64(與非適應性濾波器35相似)。因此一項具體實施例中只需 一額外濾波器。然而,若IIR濾波器用於非適應性濾波器64 ,仍然需要穩定性限制。即,由濾波器64係數定義之多項 86017 -86- 200417167 式的全部根應小於一(即在單元圓周内),以下將詳細說明。 應注意整個說明中對於傳送函數H(z)= W,W的根對應H(z) 的零’而對於H(z) = 1/W,W的根對應H(z)的極點。選擇性 滤波器31、35及64在其係數不像主要適應性濾波器62週期 性調適時係非適應性。通常他們可視為適應性速率由事件 , 驅動之適應性濾波器。 ‘· 圖28係根據本發明一項具體實施例圖9之方塊213的一部 ’ 分。流程始於決定菱形626,其中決定是否啟動適應性濾波修 焱縮短估計。若否,流程繞過圖28之流程,繼續至圖9之方 塊212。然而,若啟動,流程進入決定菱形628。適應性濾 波器縮短估計可以各種不同方法啟動。例如,其可自啟動 ,例如對系統重設作出反應。或者,其可在任何在圖4的延 遲單元66(若存在)内偵測不同延遲之時間或只要偵測到新 併合時啟動。選擇用於非適應性濾波器64或非適應性濾波 詻31及35之係數取決於特定併合16,因為每個不同併合可 具有不同脈衝回應,其具有不同純延遲或不同分散時間。 一項具體實施例中,在呼叫開始或根據影響併合之變化 ® (例如根據呼叫傳送或呼叫轉接)上述參考圖2〇至24之純延 遲估汁迅速偵測使用子速率處理估計之一純延遲。為獲得 用於非適應性濾波器64或非適應性濾波器3 1及35之濾波器 係數參考圖28說明之方法決定純延遲及分散兩者。圖28之 純延遲計算通常更精確,然而,其通常需要較長時間決定 。因此’除減少適應性濾波器62需要係數之有效數量,圖 28之方法可「微調」圖2〇至24提供之純延遲估計。圖28之 86017 -87- 200417167 方法決定任何需要加入延遲單元66以補償附加濾波器(64 或滤波器31及35)的額外純延遲。即,如以下將要說明,增 加縮短分散時間之濾波器亦嘗試稍微增加純延遲數量,因 此’延遲單元66之延遲(最初由圖20至24之方法決定)可更新 。若使用圖24之監測模式,則每次ERLE降低至ERLE限值以 下’用於延遲單元66之新純延遲即決定。此外,圖28之適 應性濾波器縮短估計選項可對ERLE降低至ERLE限值以下 作出反應啟動(即對藉由圖21之流程為延遲單元66決定的 新純延遲作出反應)。 替代具體實施例中,圖20至24之流程可不用適應性濾波 器縮短估計選項;或同樣地,適應性濾波器縮短估計選項 可用於回音消除器内,而不用圖2〇至24之純延遲估計方法 。或者’在具有圖20至24之方法的回音消除器内,適應性 濾波器縮短估計選項可獨立於圖20至24之方法啟動。同樣 ’若選項未啟動’(或者若選項仍然用作決定適應性濾波器 62之新係數以及額外非適應性濾波器64或額外非適應性濾 波器31及35之係數),額外濾波器或濾波器可簡單繞過(或者 他們可將信號未濾波即通過)。 若選項在決定菱形626啟動,流程進入決定菱形628,其 中決足ERLE疋否足夠良好。(ERLE可如上述公式26計算, 其中ERLE對應PSin及perror之間的比率,且其中pw及匕戰可 使用上述公式1及2计算。)為決定erle是否足约良好,其可 與一限值比較。例如,限值可設置為大於2〇dB的值,或者 可設置在範圍30至40 dB内。通常,ERLE越高,信號越好 86017 -88- 200417167 (因為錯誤perrcr越低)。當無Sgen(近端通話器信號)存在時 ERLE即足夠高,因為否則ERLE降低。或者,其可在繼續決 疋ERLE疋否存在及比較一限值前從上述近端信號偵測器 26決定是否存在近端通話器信號。若存在近端通話器信號 ,或者若ERLE不夠良好,流程繞過圖28之剩餘部分繼續至 圖9之方塊212。然而,若ERLEs夠良好(高於限值),流程 進入方塊630。即,當存在良好信號且從良好回音估計48獲 得錯誤信號46時應執行適應性濾波器縮短估計選項。應注 意替代具體實施例中,系統内許多信號可用以決定用於執 行選項之良好信號是否存在。 方塊630中,決定基於適應性濾波器62之當前係數的純延 遲及分散。(應注意方塊630將參考圖29詳細說明)方塊63〇 後,流程進入方塊632 ,其中根據圖63〇中決定之純延遲及 分散決定額外非適應性濾波器64或濾波器31及45之係數w 以及對應適應性濾波器62新縮短版本的適應性濾波器62之 新係數。(應注意方塊632將參考圖3〇詳細說明)。流程接著 進入決定菱形634,其中決定新組態是否足夠良妤。即不同 標準可用於決定新組態是否令人滿意。例如,一項具體實 施例中,若新組態係數減少後數量仍然大於減少係數需要 數量,為獲得係數進-步減少之數量可重覆方塊632之方法 。或者決定菱形634可不存在,以便僅執行—項疊代,方塊 632之結果視為足夠。 即方塊632内決定之用於 若在決定菱形634新組態足夠良好,流程繼續至方塊_ ’其中適應性濾波器62重新組,賤。 86017 -89- 200417167 適應性遽波器62的新係數載入適應性濾波器62且適應性濾 波器62用於組合非適應性濾波器64或組合非適應性濾波器 31及35。(應注意方塊636將參考圖31詳細說明)。亦注意在 方塊636中’延遲單元66内延遲值可藉由加入任何需要延遲 (將非適應性濾波器加入延遲66内現有延遲值)更新。流程接 著進入方塊638,其中關閉濾波器縮短估計選項。即,圖28 之流程通常不會在每一樣本基礎上執行。其僅在需要時執 行’例如上述參考用以啟動適應性濾波器縮短估計選項之 範例說明的情形。然而,替代具體實施例中,圖28之流程 可在每一樣本基礎上執行。 應注意在圖28說明之具體實施例中,方塊63〇至638係在 決定ERLE足夠良好後連續執行。然而,替代具體實施例中 ,方塊630至638(或方塊630至638之子集)可作為與回音消除 器20其他工作平行執行的分離線程啟動。完成圖“之流程 後,圖28之方法可警告回音消除器2〇結果準備就序可更新 適應性濾波器62。或者,可警告回音消除器2〇整個濾波器 縮短已完成。例如,信號或中斷可提供至回音消除器2〇以 指示方塊630至63 8之完成(或方塊630至638之子集)。 圖29說明圖28之方塊630的一部分。即,圖29之流程係決 足純延遲及來自適應性滤波器62當前係數之分散的一項具 體實施例。流程始於方塊640,其中適應性漉波器62係數之 數值移動至環形緩衝器。即,採取適應性濾波器62濾波器 係數之快照並將其儲存於尺寸]^的環形緩衝器内,其具有位 置0至N - 1。適應性濾波器62當前係數η,可用η = [h〇,…, 86017 •90- 200417167 hN-i]&示’其中h❹,·.·,hN i對應係數而n對應適應性濾波器 62係數或分接數量。因此,對應w的值儲存於環形緩衝器 内位置「n MOD N」,其中n對應樣本數量,r |x|」指示「x 數值」(且對應正值)。運算式「n MOD N」對應η模數,其 指操作η/Ν之剩餘。例如,若ν為256,η值為270,n MOD Ν 指14 ’其中|心。|從「位置27〇」(其超出尺寸n之環形緩衝器 範圍)環繞至環形緩衝器之位置14。因此,若η值大於n,N 值可繼續從η減去,直至η降至〇至ν - 1的範圍内。同樣,若 η值小於〇 ’則ν值可繼續加入η,直至η到達〇至Ν - 1的範圍 内。 流程接著進入方塊642,其中對於每個係數,h,能量Ε(η) (其中η = 〇至Ν - 1}作為尺寸LW之滑動窗内數值值的總和計 其。一項具體實施例中,LW係關於目標窗尺寸之長度,即 減少適應性濾波器62係數有效數量後分接或係數之數量。 例如,一項具體實施例中,LW可對應尺寸為1〇個樣本之滑 動窗,其中ίο個分接係需要濾波器長度。因此,若]^為256 (表示適應性滤波器62之256係數h),接著決定E(n)之256值 ’其中每個E(n)之256值係10個數值之總和(對應LW10個樣 本)。E(n)因此可表示為如下所示之公式4〇。 公式 40 :五W= 其中 11 = 〇,1,…,N - 1 /*〇 上述公式中(及本文所說明其他公式)應注意符號[χ]Ν對 應X MOD Ν。接著流程從方塊642進入方塊644,其中延遲D 設置為能量峰值負LW之位置。即決定e(滑動窗LW内能量) 86017 -91- 200417167 之N值後,最大e出現負LW之點(樣本時間)對應脈衝回應之 純延遲。因此,D可表示為公式41所示。 公式 41 : D = arg(max E(n))- LW 其中 n = 〇, 1,…,n - l 上述公式中,最大E(n)指採用E之N值中E的最大值, arg(maxE(n))指出現最大E之參數或點,其中「參數」對應 樣本時間。因此,D對應純延遲。 流程接著進入方塊646,其中分散時間對應d及下一位置 (其中E小於預定限值)之間的樣本數量。即,E(n)(對應脈衝 回應數值)在範圍η==0,1,···,Ν - 1之通常趨勢可描述為通常 向最大峰值增加,然後向回減小。因此,到達最大值後, Ε(η)減小’其減小至預定限值範園外的點對應分散時間末 端,其中分散時間因此係D與Ε(η)實現其峰值後到達預定限 值的點(樣本時間)之間的樣本數量。預定值可設置成任何指 示分散時間末端的值。例如,一項具體實施例中其可設置 為192樣本(即在8 KHz取樣速率上為24毫秒)。 圖30係圖28之方塊632—部分的一項具體實施例,其中決 定(1)非適應性滤波器係數W(用於非適應性濾波器64或非 適應性滤波器31及35)及(2)適應性滤波器62之縮短版本。流 程始於方塊648,其中決定新濾波器係數w(用於非適應性濾 波器64或非適應性濾波器3 1及35)(應注意方塊648將參考圖 32至36詳細說明)。流程接著進入方塊650,其中係數w係當 前適應性濾波器62係數卷積(即使用圖29之方塊640採用之 快照)以決定縮短濾波器係數B,其中B包含加入非適應性滤 波器64或31及35之後的適應性濾波器62新係數。流程進入 86017 -92- 200417167 方塊652,其中決定新純延遲D及縮短濾波器係數B之分散時 間。因此,圖29之流程及公式40及41可用於完成方塊652。 流程接著進入方塊654,其中從B(即具有預定義長度之b的 一部分)決定用於適應性濾波器62新適應性濾波器係數並 選擇調適之濾波器係數最大數量(即B選擇部分内樣本數 量)。 圖31說明圖28之方塊636—邵分的一項具體實施例,其中 重新組態適應性濾波器62。流程始於方塊656,其中先前在 圖30之方塊654決定之縮短係數取代當前適應性遽波器係 數Η。流程進入方塊658,其中新係數w(圖30之方塊648中 決足)載入非適應性滤波器(滤波器64或滤波器31及35)。因 此,藉由將W載入非適應性濾波器或濾波器,他們可啟動 以使適應性濾波器62具有減少之濾波器長度。流程接著進 入方塊660,其中適應性濾波器28内延遲單元66使用新延遲 更新。例如,一項具體實施例可簡單地使用新決定純延遲d 更新延遲單元66。替代具體實施例可決定當前延遲單元% 内儲存之延遲並根據需要更新現有值。或者,若新延遲並 未與延遲單元66内現有延遲改變很多,延遲單元%可根本 不更新。同樣,方塊660中,一旦適應性濾波器&在方塊656 載入新係數,其必須組態成調適新係數數量。 圖32係圖30之方塊648的一項具體實施例,其中決定新濾 波器係數W(對應濾波器64或濾波器31及35)。 Ζ 菱形662 ’其中決定任何預計算滤波器係數%是否:在。例 如,可存在已預計算之一庫,其包括夂 ^ 拾各種對應不同併合及 -93- 86017 200417167 通道狀況之不同可能組的w,因此新w可簡單地從該庫中選 擇,流程可藉由將適應性濾波器係數卷積來自該庫之全部 現有W並採取提供最佳性能的一項進入圖30之方塊65〇。或 者,可使用最代表不同狀況之單一預計算w。因此,w可以 各種不同方法離線計算,其中之一將參考圖36說明,從而 可使用預計算W。若濾波器係數W未預計算,流程進入方塊 664 ’其中可使用任何決疋新滤波器係數之方法發現w。各 種用以決定W之具體實施例將參考圖33至35詳細說明。 流程接著進入方塊666,其中決定W的根。例如,w可表 示未為W = [W〇, Wl,…,WM“],其巾w。,Wl,…,〜對應滤波 器係數而Μ對應濾波器係數數量,使w(z)可表示為如下所 示之公式42 : 公式 42 : W(z) = (wozM-k WlzM-2+ …+ Wm 2Z + Wm i)z1.m 為決定W之根,W(z)設置為0並解z,其中z具有Μβ1個答 案。因此,臀(2)的根尺可表示為尺=[1*0,1^.”,〜_1],其中根 包括複數及其共軛。W(z) = 0因此亦可表示為如下所示之公 式43 : 公式 43 : W(z) = 0 = (z - r〇)(z - Γι)···(ζ _ 〜2)(ζ _ Γμ ι),μ 流程接著進入方塊668,其中加對根的額外限制,使|可 用於FIR或IIR處理模式内並保持穩定。例如,若w用於 實施,則不需要加限制來確保穩定性,不過若用於nR實施 ,則根必須在單元圓周内。單元圓周指由對應真實數量之X 軸及對應虛擬數量之y軸定義的平面内圓周。單元圓周、儿原 點(X軸及y軸交點,對應X軸及y軸上的〇)繪製,半徑為丨。對 86017 • 94- 200417167 於每個不位於單元圓周内的W(z)之根rk,以轉置成其位於單 元圓周内。或者,並不要求根在單元圓周内,限制可加成 使W(z)根在以原點為中心半徑為p之圓周内,其中p小於^。 因此此具體實施例中,對於每個不位於半徑為p之圓周内的 W(zM^rk,根rk轉置成其位於半徑為p之單元圓周内。因此 ,若W (即rk數值)大於p,換位可表示為公式料所示: 公式44:Ή其中P<1 應注意上述公式中< 示以之複數共軌。流程接著進入方 塊670 ,其中新濾波器係數Wnew#從修改根構造。即若由於 加入方塊668之限制必須修改任一根,貿^⑼使用修改根決定 新根可代入上述r〇,…,rM1之公式43,以提供新w(z)(即 wnew)。wnew接著用作流程剩餘部分之濾波器係數其繼續 至圖30之方塊650)。因此,圖32可用於制約或投影w之根。 圖36說明-串列組脈衝回應估計中用於離線設計滤波器 係數w之方法的-項具體實施例。流程始於方塊7()4:其; 對於全部設計方法,為串列㈣每—通道脈_應決定答 案W。因此,若2個設計方法用於串列組内8個通道脈衝: 應,總共決疋16個答案(臀❻至貿㈠)。此外,圖%之方法不限 於任何決定方法。流程接著進人方塊,其中對 於每-答案W ’估計W之卷積Bk,及串列組内每一通道脈衝 回應。因此,當前範例中,其中有16個答案(w。至〜)及8 個串列組㈣衝回應,總共估計128個卷積。對於任何答案 w,每個Bk因此可表示為Bk = [bk〇,bk“^^ 86017 -95- 200417167 bk,i,…,bk,N-i為係數而N為Bk之長度。應注意[k]8表示串列組 内通道數量。 流程進入方塊708,其中對於每一Bk,定位具有最大能量 之需要長度(即目標濾波器長度)的分散區域。即,最大能量 分散區域可使用公式40及41定位,其中LW對應分散區域需 要長度。因此,方塊708之公式可表示如下。 公式 45 :尽W二 一n| 其中 η = 0,1,...,n - 1 /=0 以上公式與上述公式40相似。公式45中,Ν為特定Bk之長 度而Ek(n)對應滑動窗LW内能量(對應分散區域之需要長度) 。因此,N能量值(Ek(0),.",Ek(N- 1))係為每個心決定。因 此具有用於每個Bk之最大能量的分散區域可使用下列公式 決定。 公式 46 : Dk = arg(max Ek(n))- LW 其中 η = 〇,1,…,N - 1 公式46與上述公式41相似。公式46中,Dk對應最大能量 Bk之純延遲,因此分散區域係以Dk開始以Dk + LW結束且具 有最大能量之區域。(或者,分散區域之結束可定義為能量 Ek(n)降/至預定限值以下之點,如以上參考公式41所說明。) 因此對於每個Bk,決定最大能量之分散區域。流程接著進 入方塊710,其中對於每一Bk,估計優值pMk。優值定義為 最大能量、最大Ek(n)(來自方塊708)及Bk之總體能量Ek的比 率。因此,Ek可使用下列公式定義: 公式 47 : /=0 上述公式中,Ν指Bk之長度。優值因此可表示如下。 86017 -96- 200417167 公式48: 其中n = 〇1 ,N-1 上述公式中,N指Bk之長度。流程進入方塊712,其中決 定用於全部通道脈衝回應之平均優值fmavg。每一答案wk (上述範例中k = 0,1,···15)將具有其本身之平均優值fmavg。 流程進入方塊714,其中選擇性濾波器w係選擇以使FMavg . 在全部可能設計方法中最大化。圖36之方法可離線執行, · 且最終選擇W可儲存於回音消除器20内並根據需要載入非 適應性滤波器64、3 1或35中。 響 應注意儘管W之上述說明假定額外濾波器係非適應性, 適應性濾波器可用以取代非適應性濾波器64、3 1或35。然 而’為確保如上所述之穩定性W需要加入限制,若濾波器 係適應性,則穩定性限制可需要在每一樣本基礎上加入, 因為濾波器調適可導致不穩定濾波器。 圖33至35提供用於決定W的可能設計方法。例如,圖33 至35可對應圖36之方塊704使用的三種設計方法。或者,圖 33至35的任何或全部方法可藉由操作中的回音消除器2〇執 馨 行。一項具體實施例中,回音消除器20可執行全部三種設 ’ 計方法以決定W(例如圖32之方塊664内)並最終(圖28之方 塊632之後)決定哪一種提供最佳解決方案。應注意不同方 法可在修改從修改根重新構造新濾波器係數之後對比最佳 解決方案之根或W前(圖32之方塊668)提供最佳解決方案。 因此,不同方法可根據具體實施例藉由回音消除器2〇在不 同時間分析或選擇。或者’單一設計方法可藉由回音消除 86017 -97- 200417167 器20使用。 圖33係圖32之方塊664的一部分,其對應根據本發明一項 具體貫施例用以決定新滤波器係數之一種方法。流程始於 方塊6 7 2 ’其中適應性滤波為6 2係數之分散區域移動至環形 緩衝器,以便補償延遲D(方塊644内計算)。因此延遲補償 係數G可表示為G = [g〇, gi,…,gN-i],其中g〇, gl,…,gN“係 延遲補償係數G之係數,N係適應性濾波器62之長度。因此 ’ H(對應圖29之方塊640内採用之原始快照的適應性滤波器 62之未補償係數)及G之間的關係可表示如下。 公式 49 ·•孚=A[dwL 其中i = 〇,l,·η,Ν- 1 公式49中,gi係延遲補償係數,其儲存於對應環形緩衝器 之弟i個位置。圖3 8說明圖3 7之示範性脈衝回應的一項具體 實施例,其已藉由延遲D(對應圖37之T1)時間補償,使脈衝 回應始於分散時間(由圖37之T4 + T2定義)。因此,Η係數代 表圖37之脈衝回應,而G係數代表圖38之時間補償脈衝回應 。流程進入方塊674,其中定義需要的濾波器長度。例如, 一項具體實施例中,如上所述,需要的濾波器長度定義為 1〇(其中脈衝回應分散時間需要壓縮入10個樣本)。參考圖38 之範例’需要的濾波器長度對應丁5,〇及31之間的時間,其 中0足義分散時間之開始(亦對應(3之第一係數,因為G已延 遲補償)而S1定義需要的濾波器長度之結束。 一旦決定需要的濾波器長度,需要的濾波器長度内分散 區域之係數清除,以定義殘餘係數,V。即gi設置為〇,其 中1 = 〇,1,···,S1。因此,v可表示為 v = [〇, ··,〇, v〇,、,…, 86017 -98- 200417167 vK_i],其中K為V非零組件數量,每個V非零係數定義如 下。 公式 50 : Vj = gsi+j 其中 j = 0,1,..·,Κ - 1 因此,參考圖38之範例,對應時間Τ5的G係數設置為零, V係數代表殘餘失真,即對應時間Τ6之脈衝回應部分。流程 進入方塊676至680,其操作係均衡殘餘失真,V。 方塊676中,計算V之快速傅立葉轉換(fast Fourier transform ; FFT)。流程進入方塊678,其中計算FFT(V)之反 轉I,其中I = 1/ FFT(V)。流程進入方塊680,其中Wi作為I 反轉FFT(IFFT)計算,其中W^IFFTCI)。因此,Wj V之反 轉,且可用於均衡殘餘失真V。流程進入方塊682,其中W 從具有最大能量之預定長度W!窗決定(與圖29上通道分散 之估計相同),其中預定長度係適應性濾波器分接之需要數 量。流程接著進入方塊684,其中正規化濾波器係數W,例 如,藉由W之歐幾裏德數(即L2標準)。 圖34係根據本發明一項具體實施例用以決定係數W之替 代方法。流程始於方塊686,如上所述,其中定義使用延遲 補償濾波器係數G(來自方塊672及公式49)所需要的濾波器 長度,並決定卷積矩陣C。卷積矩陣C定義如下。The flow proceeds to block 485, where the power of the sub-rate Rin (pRinSR), the power of the sub-rate Sin (PsinSR), and the sub-rate near-end talker detection flag (si * -near-end-detect-flag) are determined. For example, the following formula can be used to determine pRinSR, PsinSR, and P error SR (k). Equation 16PRinSR (k) = (l-a) PRinSR (k -1) + αRinSR2 (k); Equation 17: PSinSR (k) = (l- α) PsinSR (k -i) + α SinSR2 (k); Formula 18 ·· PerrorSR (k) = (i_a) .perr () rSR (k_l) + a .errorSR2 (k) Note that in the above formulas (Equations 16 to 18), k is the signal subrate The number of samples, for example, let SinSR (k) = Sin (k · D). Equation 18 corresponds to the sub-rate error, wrong u Wu SR 'It corresponds to the difference between SinSR and the sub-rate echo estimate' y (k), which is determined by the sub-rate adaptive filter 122 of FIG. 7, which will be described below with reference to block 494 . Therefore, err0rSR (k) and Perr (> rSR (k) will be described in detail below. Similarly, in a specific embodiment of the above formula, a is set to 1/280, which corresponds to a human found in a telephone channel. For speech statistics, it should be noted that 1/280 is also 86017 -64- 200417167, which corresponds to a sliding window of about 70 milliseconds for the average filter bandwidth. However, different specific embodiments may use different Aval values. (Note that the above sub-rate power The calculation can be performed by the power estimator 120 and the power estimator 118 in FIG. 7.) The decision of sr_near_end_detect_flag can be completed in the same way as the detection of the near end # described above with reference to FIG. Η. Therefore, perr () The minimum values of rSR (k) and pSinSR (k) are compared with the NESD sub-rate limit (NESD_SR_threshold) to determine whether there is a near-end talker signal (Sgen). (It should be noted that this can be done by using Figure 7 The near-end cymbal detector 114 is executed.) The right one determines that sr_near_end detect_flag is correct and set it to TRUE. This flag is used to bypass the filter coefficient update of the sub-rate filter 122, because if it exists Near-end talker signal, as described above, Sin 38 It is no longer a representative of pure residual echo but a mixture of both Sgen & residual echo. Therefore, as explained above with reference to adaptive filter 28, the 'subrate / filter 122 should only be adapted when SinSR includes only subrate echoes (Ie when the near-end talker signal is not present.) Also, as explained above with reference to the adaptive filter 28, the sub-rate filter 122 should be adapted when pRinSR is high enough to prevent adaptation to channel noise. It should be noted as above As explained with reference to the adaptive filter 28, the near-end talker ID can be detected in single-dial and dual-talk situations. That is, using the above algorithm, Sgen can be used in the presence of only one near-end talker or near-end and far-end. It should also be noted that other methods can be used to determine whether the near-end talker exists. For example, a specific embodiment can use a Geiger algorithm, which is well-known for detecting near-end calls. After the block 485, the process enters the decision diamond 486, which determines whether pRin⑽ is greater than the minimum power limit of the sub-rate Rin. If not, the process enters 86017 -65- 20041716 in Figure 9 7 Block 213 bypasses the update of the sub-rate adaptive filter 122. As described above, this prevents the sub-rate adaptive filter 122 from adapting to channel noise. The minimum power limit setting of the sub-rate Rin in a specific embodiment is set It is -45 dBmO. If the minimum power limit is met, the process enters a decision diamond 487, which determines whether sr_near_end_detect_flag is FALSE. If the minimum limit is not met, the process enters block 213 in Figure 9, as described above, because there is The near-end talker signal thus bypasses the update of the sub-rate adaptive filter 122. If sr_near_end_detect_flag is FALSE, the flow proceeds to block 494, which indicates that Prusr is sufficient and there is no near-end talker signal. In block 494, the sub-rate echo estimate y (k) is calculated, and then in block 496, the coefficients of the sub-rate adaptive filter 122 are updated. In a specific embodiment, a modified NLMS algorithm (the modification is used in the sub-rate method) can be used to calculate y (k) and update coefficients. Formula 19: y (k) = XT (k) · H (k) The above formula 19 represents the filtering of the input signal X, where X (k) = [x (k), x (k -1), ..., x ( k-N +1) is the input signal vector (at subrate D) that extends over the duration of the FIR filter range. Therefore, x (n) = RinSR (n). Similarly, in Equation 19, H (k) is the filter coefficient vector (for sub-rate sampling) for the k-th iteration, where: Equation 20: H (k) = [h〇 (k), hi (k ), ..., hN-Kk)] 1 Formula 21: H (k +1) = H (k) + step-size · errorSR (k) · X (k) The above formula 21 represents the filter coefficients according to the NLMS algorithm Update the formula, where the NLMS sub-rate step_size can be expressed as follows. Formula 22: step-size = β / [γ + PRinSR (k)] 86017 -66- 200417167 In Formula 22, the ^ adaptation constant, which is the "protection" period, ensures that when pRinSR (k) temporarily becomes small, the adjustment formula is The update period of X is not too large, and the input signal power when sampling at the sub-rate (see Equation 16). Equation 23: errorSR (k) = SinSR (k)-y (k) (adjust at sub-rate Error) In the above formula, RinSR corresponds to the filtered and ten-sampled remote signals (which corresponds to the output of the ten-sampled sampler 106 in Figure 7), while RinSR corresponds to the filtered and ten-sampled echo signals (located in The output of one of the ten samplers 10 in Figure 7). It should be noted that when Sgeri does not exist, Sin 38 only includes the residual echo, so the output of the one of ten samplers 110 is used as a filter and ten Select a sampled echo signal. The variable H (explained with reference to Fig. 19) corresponds to a column vector representing the coefficient estimates of the sub-rate adaptive filter 122, and "τ" after η indicates a non-vector transposition. The signal y represents the SinSR estimate provided by the adaptive filter 122. The error SR is the difference between SinSR and y. Similarly, in a specific embodiment of the above formula, β is set to 2 · 9 * 2 · 5, and α is 1/128. In a specific embodiment, γ is set to a small value (relative to pRinSR⑻). For example, if PRinSR (k) is represented by a 16-bit fraction, y is usually k · 2-n, where k is a small integer. The flow then proceeds to a decision diamond 498, where it is determined whether n is equal to N, where in the current specific embodiment, N corresponds to the duration of a single measurement cycle. In a specific embodiment, N corresponds to 300 ms, and therefore corresponds to 300 sub-rate samples (assuming D = 8). For example, if a signal (e.g. Rin 44 and 8111 38) is sampled at an 8 kHz rate, then samples are received every 125 milliseconds. In the current specific embodiment, d is 8 ', so each D-th sample corresponds to 8 * 125 microseconds, which is equal to 1 millisecond. Therefore, every N sub-rate samples, the flow enters blocks 503, 500, and 501, where N is 300 in the current specific embodiment of 86017-67-200417167, so that 300 * 1 millisecond is equal to 300 milliseconds. Therefore, 'N can be defined as a predetermined number of time windows or sub-rate samples with a predetermined duration, which must be determined before the estimated delay processing at blocks 500 and 501. The value of N can be programmed or fixed into the echo canceller 20 and can be any value, depending on the frequency required to calculate the new estimated delay value. It should be noted that N corresponds to the convergence time (ie, short-term convergence time) used for the sub-rate adaptive filter 122. For example, if a window of 1024 samples (which corresponds to 1024 * 125 microseconds in the current specific embodiment, which is equal to a window size of 128 microseconds, assuming a basic sampling rate of 8] ^ 1 ^) is used to capture the impulse response ( For example, T3 in FIG. 37), 1024 / D sub-rate samples are used (for example, 1024/8 = 128 sub-rate samples in the current specific embodiment). That is, the current specific embodiment enables a convergence time of 300 ms to achieve 128 sub-rate sample values of the channel sub-rate pulse response (as seen in the Rin> eSin termination end of the echo canceller) and find its maximum value. Although described above, in different embodiments, different convergence times (ie, different size measurement periods N), different window sizes (ie, not limited to 1024 basic rate samples or 128 milliseconds), and different sub-rates (where D may be Any value, including 1) and a sampling rate other than 8 kHz. If the diamond 498 is being determined, the decision index η (which may be initialized to an initial value at the beginning of the call, such as 1 or 0) has not reached N, the flow proceeds to block 502, where η is incremented, and the flow continues to block 213 of FIG. However, if the diamond 498 is determined and η is equal to N, it means that 300 samples have been processed (corresponding to the duration of 300 milliseconds), the flow proceeds to block 503, where η is initialized to 1, and other measurement cycle variables are also initialized (such as PRinSR, PSinSR , Sr_near_end_detect_flag, etc.). The flow then proceeds to decision diamond 504, where it is determined whether the serial index is two. If so, the flow bypasses block 505 and proceeds to block 500. However, if the string 86017 -68- 200417167 column index is not 2, the flow proceeds to block 505, where the string index is incremented. As explained above with reference to FIG. 20, the serial index is used by the selective serial mode, wherein the serial signal is injected only at the beginning of a telephone call. Therefore, the tandem reference is used to indicate the beginning of a telephone call. The flow then proceeds from block 505 or decision diamond 04 to block 500, where the pure delay is estimated separately. It should be noted that separately estimating the pure delay corresponds to the pure delay estimated for each measurement period (that is, for every N sub-rate samples), which will be described in detail with reference to FIG. 22. After estimating the pure delay alone, the process proceeds to block 501, where several (2, 3 or more, depending on the specific implementation and depending on the call phase) effective separate pure delay estimates are used to determine the estimated delay of 13 °, which will be referenced Figure 23 illustrates this in detail. FIG. 22 illustrates a specific embodiment of the block 500 of FIG. 21 in which the delay is individually estimated. The flow begins at block 506 where the sub-rate echo return loss enhancement (SR-ERLE) is determined. The following formula can be used to determine sr_eRLE: Formula 24 ·· SR_ERLE (k) = 10 * l0gl0 (PsinSR⑻ / p⑽⑽⑻) Therefore SR_ERLE corresponds to the ratio between PsinSR and PerrorSR, which is used to verify pure delay measurement. SR-ERLE provides information about the convergence (good) of the sub-rate adaptive filter 122 (ie how many echoes have been eliminated). That is, a higher SR-ERLE (e.g., 5 dB or more) indicates that the adaptive filter 122 has sufficiently converged during the current measurement period. (It should be noted that the SR-ERLE can be determined by the ERLE estimator 116 operating at a given sub-rate, see Figure 7.) Therefore, after block 506, the process enters the decision diamond 508, where the SR-ERLE and the sub-rate ERLE limit In comparison, if it is not greater than this limit, the flow proceeds to block 514, which indicates that the current measurement period should not be used because of insufficient SR-ERLE. Therefore, the current 86017 -69- 200417167 measurement (for the current measurement cycle) is abandoned and the flow goes to block 501 in FIG. 21. However, if SR_ERLE exceeds the sub-rate ERLE limit, the flow proceeds to block 510, which performs another check on the convergence of the sub-rate adaptive filter 122. In block 510, the peak-to-average ratio (PAR) of the coefficients of the sub-rate adaptive filter 122 is determined. Referring to Figure 37, the peak corresponds to the maximum value (meaning that the peak value is the maximum distance in the positive or negative direction of the zero axis). The peaks in Figure 37 are indicated by the symbol _. The average value is calculated using the absolute value of the sub-rate adaptive filter coefficients. ′ If the PAR is not greater than PAR-Threshold, the flow proceeds from the decision diamond 512 to the square _ block 514, where the current measurement is abandoned because the current measurement cycle does not provide the appropriate convergence of the sub-rate adaptive filter 122. However, if the PAR is greater than PAR-Threshold, the flow proceeds to block 516, which indicates that to ensure that the sub-rate adaptive filters are sufficiently converged in the current measurement cycle, two conditions are satisfied. In block 516, the neutron rate adaptive filter 122 coefficient maximum value (corresponding peak value) and its corresponding time value (T peak value in FIG. 37) are located (which can be performed by the maximum value positioner 124 in FIG. 7). The flow then proceeds to block 501 of FIG. 21, which is described in detail in FIG. FIG. 23 is a specific embodiment of the block 501 of FIG. 21, which determines the pure delay _ estimate (corresponding to the delay decision 126 and the estimated delay 130 of FIG. 7). As mentioned above, pure delay is usually estimated at the beginning of a call and can change between calls if certain conditions are met. It is generally conservative to change the estimate of pure delay in the middle of a call because (a) statistics for telephone calls (PSTN calls and packet phone calls) indicate that pure delay does not change very frequently in the middle of a call, and (b) from the perspective of the phone user Changing the pure delay estimate too often (by being too close to tracking) can be destructive. Therefore, the process starts with the decision diamond 528, which determines whether this is 86017-70 · 200417167 / person, whether it is a child journey (that is, the beginning of a telephone call), or whether the previously estimated delay is equal to zero (which may correspond to the start of the call or (The middle of the grunt was previously estimated to be zero). If it is one of these two situations, the process enters a diamond shape, which determines whether two valid measurements are available. As explained above with reference to FIG. 22, each individual estimated delay is verified using both sr-erle & par, and only the individually estimated delay is verified as the corresponding delay measurement stored. Therefore, there is a possibility of obtaining another valid K for each measurement: cycle (every 300 milliseconds in the current specific embodiment). Assuming that there are at least two available (which are obtained using at least two measurement cycles), the flow proceeds to block 53o, where one of the estimated delays, the "fast track" calculation, starts at block 53o. In block 530, the 'first buffer is filled with two consecutive valid measurements. The flow proceeds to block 5 3 2 ′ where the two measurements and the dispersion between the averages of the two measurements are used. For example, dispersion can be the difference between two measurements. The process proceeds to a decision diamond 534, in which it is determined whether the dispersion is less than the dispersion limit and whether the average value is greater than the average value limit1. If not, the new estimated delay is not calculated and the flow proceeds to block 213 of FIG. However, if these conditions are met, the flow continues to block 542 'where a new estimated delay is calculated. Therefore, the dispersion limit value 1 and the average value limit value 1 ensure that the new estimated delay is calculated only when there is enough time between the two measurements. In other words, 'if the time difference between the subsequent impulse responses reaches its maximum value, the measurement delay is too large' until the subsequent measurements are more consistent (ie closer to each other). In block 542, the following formula can be used to calculate the new estimated delay: Formula 25: New estimated delay = average value · offset In the above formula, the average value corresponds to the average of the two measurements used in block 532. The offset corresponds to the actual response The amount of time -71- 86017 200417167 before the peak reached within the initial impulse response. That is, referring to FIG. 37, the peak corresponds to the time when the number of T4 is greater than T1 (pure delay). Therefore, T4 must be subtracted from the peak time (τ peak) value. The offset corresponds to this T4 value, and the offset can be determined and programmable into the echo canceller 20 using statistical information about the different but typical merge circuit impulse responses that occur in the area. The new estimated delay (corresponding to the estimated delay of 13) is then applied to block 544. For example, applying the estimated delay of 13 may correspond to the activation of the selective delay block 66 of Fig. 4, which is a specific embodiment of the adaptive filter unit µ. Therefore, by using pure delay estimation, the number of filter taps required by the adaptive filter unit 28 is reduced, because the coefficient used to respond to the pure delay portion can be regarded as zero. It should be noted that alternative embodiments may require more or less than two measurements in determining diamond 529 to continue the "fast track" calculation. In a specific embodiment, only one valid measurement is required. In this case, the dispersion and average values are not calculated (because only one measurement is used). Similarly, the actual value can then be checked for the average value limit i before deciding whether to proceed to block 542, while scatter comparison is not required. Instead of one embodiment, more than two valid measurements are needed, and the dispersion may correspond to the variance used in the valid measurements. Therefore, alternative embodiments may require any number of valid measurements. If the diamond 528 is being determined, this is not the first time the call has passed (usually means that pure delay estimation is performed in the middle of the call) and the previous delay estimation is non-zero, the process enters the decision diamond 535, which determines whether M valid measurements are available. For item U, the choice of M is 3, 4, or 5 (depending on the specific setting selected by the echo canceller installer). The value of M can be selected to require more or fewer measurements before it is possible to update (ie change) the current estimated delay value. The higher the number, the less 86017 -72- 200417167 flow enters block 536. Therefore, M can be selected to any value and is not limited to 3 to 5. If M valid measurements are not available, the flow proceeds to block 213 'of Figure 9 to bypass the possibility of changing the estimated delay value. However, if M valid measurements are available, the flow proceeds to block 536, where the second buffer is filled with μ consecutive valid measurements. In block 538, the dispersion, average, and difference between the average and the previous average are calculated. As mentioned above, dispersion can be calculated in various ways. For example, if M is only 2, the dispersion can simply be a difference. Alternatively, dispersion can be calculated as a change. The previous average corresponds to the average previously calculated when blocks 538 or 532 passed. After the calculation of block 538, the flow proceeds to a decision diamond 54, where various limits are used to determine whether it is worth changing the estimated delay. Therefore, determining the limit of diamond 540 can be used to establish more dialog criteria to change the estimated pure delay in the middle of a call. In determining diamond 540, the dispersion is compared with the dispersion limit 2, the average is compared with the average limit 2, and the difference between the average and the previous average is compared with the difference limit. If the dispersion is less than the dispersion limit 2, or the average is greater than the average limit 2 ', or if the difference is less than the difference limit, the flow proceeds to block 213 in FIG. 9 without calculating a new estimated delay (ie, maintaining the current estimated delay). However, if all of these conditions are satisfied (the dispersion is less than the dispersion limit 2, the average is greater than the average limit 2, and the difference is greater than the difference limit), the process proceeds to block 542 where a new estimated delay is calculated (as explained with reference to Equation 25) ) And apply it to block 544, as described above. Using "Fast Tracking", the dispersion limit 2 ensures that the M valid measurements will not deviate too much from each other, and the average value ensures that the M valid measurements are large enough to keep the need to change them (for example, if the average value is relatively small, no change Return to 86017 • 73- 200417167 The pure delay of the sound canceller. If the small pure delay is provided correctly, it can be adjusted by the adaptive filter 28). The comparison of the difference and the difference limit prevents the current estimated delay from changing if the difference is too small (ie, less than the difference limit) and therefore not worth changing. Figure 24 illustrates a specific embodiment of a selective monitoring mode that can be used to reduce MIPS (million instructions per second, a common standard used by digital signal processors) by the echo canceller 20. The flow of FIG. 24 is part of 211 of FIG. 9 and can be used to decide when to execute the flow of FIG. 21. The flow begins at block 518, where the film returns to the echo return loss enhancement (ERLE). ERLE corresponds to the “good” convergence of the adaptive filter 28 (ie, provides information on how many echoes have not actually been eliminated by the adaptive filter 28). The following formula can be used to calculate ERLE: Formula 26: ERLE (n) = 1〇 * i〇gl〇 (Psin⑻ / p⑽r⑻) ERLE therefore corresponds to the ratio between PSin and perr〇r, where the number of samples is read. (It should be noted that Psin and Perror can be calculated using the above formulas 1 and 2.) This ERLE value is therefore used in the monitoring mode used to enter the pure delay adjustment method of Figure 21. The process proceeds to decision diamond 520, where ERLE is compared to an ERLE limit. If the ERLE is greater than or equal to the ERLE limit, the convergence of the adaptive filter 28 is sufficient and no pure delay estimation needs to be performed, and the flow proceeds to block 213 in FIG. However, if the ERLE is less than the limit, the convergence of the adaptive filter 28 is insufficient and the process proceeds to block 521 where the ERLE counter is incremented. (It should be noted that the ERLE count is initialized at the beginning of the mother call.) The flow then proceeds to the decision diamond 523 ′ where the ERLE counter is compared with the ERLE counter limit. If the ERLE counter has not reached the ERLE counter limit, the flow bypasses block 522 (corresponding to the flow of FIG. 21) and proceeds to block 213 of FIG. However, if the ERLE counter has reached the limit of 86017 -74- 200417167 ERLE counter, the flow proceeds to block 522, where the entire flow of Figure 21 is performed (as described above). The flow then proceeds to block 524, where the ERLE counter is reset, and then the flow proceeds to block 213 of FIG. The ERLE counter and ERLE counter limits ensure that if the ERLE frame calculated in block 518 (changes from the above ERLE limit to below the ERLE limit occurs too frequently), the pure delay will not be recalculated and updated. That is, the ERLE must fall below the ERLE limit for a period of time (controlled by the ERLE counter and the ERLE counter limit) before entering the process in Figure 21. This helps prevent rapid and undesired changes in pure delay estimates. 8 and 25 to 27 are specific embodiments of audio detection, which can be used in the echo canceller 20, wherein FIG. 8 illustrates a part of the monitoring and control unit 30 in the form of a block diagram, and FIGS. 25 to 27 are flowcharts. Formally illustrates a portion of block 209 of FIG. When at least one of the echo canceler 20 inputs (such as Rin 44 or sin 38) is audio, the stability of the adaptive filter 62 may be affected, leading to undesired distortion and degradation of service quality in the telecommunications network. Audio is a signal consisting of sinusoidal components that have a constant value, frequency, and phase for a specific period of time. Any adaptive algorithm that attempts to minimize the average power of the residual echo (eg, used by the adaptive filter 62) will have a dynamic behavior that depends on the autocorrelation matrix of Rin 44. Receiving path signals of a particular class can make this matrix singular 'which can temporarily degrade the adaptive method and deviate the filter coefficients of the adaptive filter 62 from required values. For example, a sinusoidal signal (single frequency audio) can cause this situation. In this case, the autocorrelation r (k) of the sinusoidal signal Rin (n) = Acos (i2n + 沴) is provided by r (k) = A2cos (Qk) / 2, most of which are practical in the case of 86017 -75- 200417167 Results in a singular autocorrelation matrix (ie when its size is large). At this time, the possible result of the adaptive algorithm is a set of sine form filter coefficients (for the adaptive filter 62), which is an error estimation of the impulse response of the actual combined circuit. Figure 37 provides an example. Similarly, multi-frequency audio can also cause similar problems, because when the number of components is not large enough or the matrix has a large size, their autocorrelation can still generate a singular autocorrelation matrix. It should be noted that the size of the matrix depends on the number of filter coefficients used to estimate the impulse response of the combining circuit. Therefore, it is necessary to detect the presence of any signalling and control audio, and then terminate the adaptation method of the adaptive filter 62 to prevent divergence from a good set of filter coefficients. A specific embodiment described with reference to FIGS. 25 to 27 uses a polynomial filter, such as a modified version of the Teager_Kaisef filter for indicating the presence of a sinusoidal signal of any frequency, a method for identifying a smooth correlation of a predetermined single frequency audio, and Decision logic for reliable audio detection. It should be noted that any suitable polynomial filter can be used. The polynomial filter in Figure 8 is an example. Although the specific embodiments described herein are generally referenced to the echo canceller 20, they can be used with any device or telecommunications device that requires audio indication and detection, and are not limited to echo cancellers. Figure 8 includes a specific embodiment of the power estimator 134, which maps any single frequency audio to a constant by modifying the energy operator. That is, a single frequency audio can be expressed as follows. Equation 27: x (n) = Acos (Qn + more) Modifying the energy manipulator Tk can be expressed as follows. Formula 28: ⑻) = X2 (n one moxibustion) one one two moxibustion) sin2 (ΑΩ) 86017 -76- 200417167 In the above formula, it should be noted that x2 (n-k)-x (n) x (n -2k) corresponds to The output of the adder 144 in FIG. 8 (that is, the output of the delay 136 is x (n-k), the output of the delay 138 is x (n-2k), and the output of the multiplier 140 is x (n) x (n-2k ), The output of the multiplier 142 is x2 (n-k), and the output of the adder 144 is the sum of the output of the multiplier i42 and the output of the multiplier 140). It should be noted that the input signal χ (η) can correspond to Rin 44 or Sin 38. In addition, substituting χ (η) of Formula 27 into x2 (n-k) -x (n) x (n-2k), the result A2sin2 (kD) is obtained. It should be noted that Ψ depends on the value A and the audio normalization frequency ω (Ω = 2πί / [, where f is the audio frequency and fs is the sampling frequency, which is 8 kHz in a specific embodiment). The parameter k in these formulas defines the basic sub-rate processing, where k can be any integer value, including 1. Therefore, applying Vk at the sampling rate fs is equal to applying Ψ1 at the sampling rate fs / k. As mentioned above, sub-rate processing can be used to reduce computational requirements, where only every k-th sample is processed. (Note that ψ) < :( χ (η)) does not depend on the initial phase 0, but generates a short-term transient based on a steep phase change, which can be used to detect a phase change in the communication signal χ (η). The x (n) power (Equation 27) can be expressed using the following formula. EQUATION 29: Powerx⑷ = A2 / 2 Therefore, pay attention to Ψ1 <: (χ (η)) provides the power of χ (η) scaled by 2sin2 (kD) such that: Formula 30: Ψ1 < :( χ (η)) = Powerx (n) * 2sin2 (kQ) So solving Powerx according to Vk (x (n)) provides the following formula: Formula 31: P〇werx⑷ = Ψ1 < :( χ (η)) 〇8 (: 2 (1 <: Ω) / 2 However, in practice, the signal x (n) (which may correspond to Rin 44 or Sin 3 8 in the specific embodiment illustrated in FIG. 8 as described above) may be damaged by noise, generating a noise estimate ψ 86017 -77- 200417167 Noise k (x (n)). Any low-pass filter can then be used to smooth the result, such as a single-pole low-pass filter. Therefore, as seen in FIG. 8, the power estimator 34 includes an output that receives the value 146 (corresponding to the absolute value of the output of the adder 144) and a low-pass oscillator from a of the storage 150 and provides a smooth estimation of ψ noise P (n). P (n) can be expressed as the following formula: · Formula 32 ··-1) + (1-ψ2 («One, in the above formula, a is a smoothing parameter that controls the bandwidth of the smoothing low-pass filter · (〇 < a < l). It should be noted that a fixed or variable smoothing parameter may be used and then ρ (η) φ is provided to the audio instruction determination unit 166 of FIG. 8, which indicates whether audio exists based on the variance of the estimated p (n), which will be described in detail below with reference to FIG. 26. Although Figure 26 refers to power, other functions of the communication signal can be used, such as correlation (see Figure 27), or even the communication signal itself. Once an audio is present, a specific embodiment detects any predetermined single frequency audio with or without phase reversal, such as 2100 Hz signaling audio. A specific embodiment for detecting predetermined audio will be described in detail below with reference to FIG. Therefore, a specific embodiment may only include the audio detection of FIG. 26, instead of the specific embodiment, as shown in FIG. Include cross-references between the algorithms of Figures 26 and 27. In addition, the specific embodiment of FIG. 26 can also be used in the monitoring mode to restart the adaptive method of the adaptive filter 62 after receiving audio. That is, the conversion between the transmitted audio signal and the voice signal can also use P (n) variance detection (that is, the conversion is detected when the variance is greater than a predetermined limit). Given the estimate p (n) according to the flow of FIG. 26, the audio instruction determination unit 166 may be used to detect audio. The time interval of the mud path detection p (n) variance in Fig. 26 is small. Whenever a single frequency audio appears on x (n), it is expected to correspond to a small square of p (n) 86017 • 78- 200417167 The difference of P (n) (constant foot level. If the audio is composed of multiple frequencies, p (n ) The variance will increase 'but the average level will remain constant. Therefore, single or multiple frequency audio can be indicated according to the variance level. The flow in Figure 26 therefore begins at block 588, where k, a, m, r, Plow, and Mmin are set to Required values. Depending on the desired audio frequency range and the level of noise in the system, these values can be, for example, k = 2, a = 0.9, m = 1, r = 0.95, PlQw = 2-8. Nmin depends on The sampling rate and the minimum required duration for detecting audio. The process enters a decision diamond 59, which determines whether P (n) is greater than PlQW, where Piqw corresponds to the limit indicating the lowest signal level (to be considered). If not, the process Go to block 598, where the detection counter is reset (zero) ', then go to block 604, indicating that the audio is not detected, and then go to block 554 in Figure 25. However, if P (n) is at least greater than Pl () w, The process proceeds from decision diamond 590 to block 592, where Pmin and Pmax are calculated. Pmin corresponds to m samples The minimum of the two estimates of separated P (n), and Pmax corresponds to the maximum of the two estimates of P (n) separated by m samples. Formula 33: Pmin = MIN (P (n), P (n -m)) Formula 34: Pmax = MAX (P (n), P (n-m)) The variance level is estimated by comparing Pmin and Pmax. Therefore, the process enters to determine diamond 594, where the ratio of Pmil ^ Pmax (ie Pmin / Pmax) is compared with the audio indication limit. If it is not greater than the audio indication limit r, the flow proceeds to block 598, where the detection counter is reset, and then the indication audio is not > Block 554 of 25. However, if Pmin / Pmax is greater than the audio indication limit, then P (n) is considered sufficiently constant (ie, Pmin and Pmax are sufficiently close) to indicate the possibility of audio. In this case, the flow proceeds to block 596. Where the chastity counter is incremented (it should be noted that the detection counter can be initialized or reset at any other appropriate time before the call begins or before entering the flow of 86017-79-200417167 Figure 26). The flow enters decision diamond 600, where the detection is determined Whether the counter is greater than Nmin. If the detection counter has not yet reached, then The flow enters block 604 indicating that the audio is not detected, and then proceeds to block 554 in FIG. 25. However, if the detection counter is greater than Nmin, the flow proceeds to block 602, where audio is detected (which is the same as the audio indicator signal in FIG. 8). The judgment of 168 is consistent). The flow then proceeds to _ block 554 in FIG. 25. Therefore, audio is detected when p (n) is greater than the minimum level (Piqw), the variance of p (n) is less than the minimum value (about the audio indication limit), and when the detection counter is greater than the minimum value Nmin. The detection counter ensures that the audio is detected and it is determined that the audio has been present for at least a specific amount of time (corresponding to ^ _) before the audio indicator signal 168. This helps prevent rapid exchanges between detected and undetected audio, which can cause the adaptive method of adaptive filter 62 to be turned on or off too frequently. FIG. 8 includes a specific embodiment of the smoothing correlator 152. This correlator can be used in a variety of ways including the detection of any predetermined single frequency audio, the detection of the amplitude modulator signal carrier, and the detection of multi-component audio with frequencies close to the nominal frequency. The smoothing correlator 152 receives samples of the input signal χ (η) (as described above * which may be Rin 44 or Sin 38) and three control parameters b, b, and e from the storage 150 and generates two correlation estimates. These correlations are used to indicate the presence of predetermined audio, as will be explained below. The control parameter c defines one of the coefficients of a second sequential digital booster w (n), which generates a predetermined single frequency audio with a normalized frequency = 2wfd / fs, where fs is the input sampling frequency as above. The state of the vibrator is initialized to w (-l) = 1 and w (-2) = c = cos (Qd), and is used by w (n) = 2 * c * w (n-1)-w (n _ 2) Provided standard 86017 -80- 200417167 quasi-second sequential digital oscillator. (It should be noted that the oscillator may correspond to the oscillator 164 ′ of FIG. 8 and receive c and provide w (n) as an output to the multipliers 156 and 158.) Input the x (n) sign and the delayed version x (n_e) ( That is, the output of the delay I ”of FIG. $ Is related to w (n) (by multipliers 156 and 158) and then passed through a low-pass filter (ie, low-pass filter 160 of FIG. 8 to receive the output of multiplier 58), which is available x (n) w (n) represents, and the low-pass filter ι62 of FIG. 8 receives the output of the multiplier 156, which can be represented by x (ne) w (n). The parameter b is provided as an input to the low-pass filter 160. And 162, of which < b < l defines the bandwidth of the low-pass filter. Similarly, a specific embodiment of the smoothing correlator 152 may use smoothing single-pole low-pass filters as the low-pass filters 160 and 162. Similarly, in an alternative embodiment, the oscillator signal w (n) and the delayed version χ (η _ e) may be related to χ (η) instead of w (n) and χ (η) and χ (η- e) relevant. Also, in a specific embodiment, the delay factor is expressed as follows. Equation 35: e = 2Ω ^ The above equation corresponds to approximately 90. The phase difference, where | V | represents the smallest integer greater than or equal to its argument X. Referring again to FIG. 8, the output of the low-pass filter 160 is a correlation estimation rule ^ ... and the output of the low-pass filter 162 is a correlation estimation Rjn), both of which are provided to the audio instruction determination unit 166.仏 ⑻ and heart ⑻ can be expressed as ⑻ = b · R〇 (n -1) + (1- b) · w (n) · x (n), and RKn) = b · RKn -i) + b) · W (n) · x (n-e). Therefore, if the unknown audio has been instructed by the audio instruction determining unit (using the above-mentioned flow of FIG. 26), (η) uses the flow analysis of FIG. 27 to identify the existence of a predetermined single-frequency audio (corresponding to the oscillator 164). 86017 -81- 200417167 In order to detect specific audio, the process in Figure 27 correlates the detected audio to a predetermined single frequency audio. In Fig. 27, the flow starts at block 606, where c, e, b, u, q, and Mmin are set to the required values. The parameter is directly related to the frequency of the detected target audio ' It also defines the delay value e. According to the noise level in the system, the remaining value can be, for example, b = (K9, u = 1, q = 0.95, P1 () w = 2 · 8. Mmin depends on the sampling rate and the minimum need to detect the target audio Duration. The flow proceeds to block 608 'where R (n) and Rmh ^ Rmax are evaluated, as shown in the following formula. Formula 36: Outward 々 (4W4) Formula 37 ·· Rmin = MIN (R (n), R (n _ u)) Formula 38: Rmax = MAX (R (n), R (n _ u)) R (n) refers to the correlation between the peak values. Corresponding to two R (n) separated by u samples The minimum value of the estimate, and the maximum value of the two estimates of R (n) separated by ^ samples. The process then proceeds to determine the diamond 610, where the ratio Rmi3 + Rmax (Rmin / Rmax) and the correlation limit "its In a specific embodiment, the comparison is set to 0.95). If the ratio is not greater than the correlation limit, the flow proceeds to block 610, where the correlation counter is reset (zero), and then proceeds to block 618, which indicates that the predetermined frequency is not detected (Dr = 〇), and then proceed to block 560 in Figure 25. However, if the ratio is greater than the limit, the flow proceeds to block 612 where the correlation counter is incremented. (Note that correlation The counter can be initialized or reset at the beginning of each call.) The process enters the decision diamond 614, where the correlation counter checks Mmin. If the correlation counter is not greater than Mmin, the process proceeds to block 618, which means that the predefined frequency is not detected (Dr = 〇 ). However, if determining diamond 614, determine whether the correlation counter is greater than Mmin, the process enters decision diamond 620, where it is determined whether r 决定 is equal to R〇⑻ 86017 -82-200417167 absolute value. If so, the process proceeds to block 622, where a ruler is used. Slave ... symbol detection predefined frequency, ie Dr = sigr ^ R〆 !!)). If not, the flow proceeds to block 624 'where the R! (N) symbol is used to detect the predefined frequency, ie Dr = sigj ^ Rjn) ). The flow proceeds from block 622 or 624 to block 560 in FIG. 25. Therefore, as with the flow for detecting any audio illustrated in FIG. 26, when used for a predetermined amount of time R () defined by the correlation counter and Mmin n) Detection of predefined audio with very small variances. This helps prevent rapid exchange of detection counters and Nmin as described above. The method of Figure 27 is equivalent to using the validity given by the following formula Sliding correlation: Formula 39: You # («) = 1/2 ^ (+ Formula (Ca⑷yi. (+ Ruler) The above formula is generated based on the largest numerical component. Figure 25 illustrates the overall method flow including the flow of Figures 26 and 27. A specific embodiment 'wherein FIG. 25 illustrates a portion of block 209 of FIG. 9 according to a specific embodiment. In Figure 25, the flow starts at block 550, where the minimum counter values (Lmin-p and Lmin_n) are selected for Dpositive (Dp) and Dnegative (Dn), respectively. These values are selected to meet the required minimum and positive phase durations. Corresponds to a positive phase counter and Dn corresponds to a negative phase counter. The flow then proceeds to block 522, where a search is detected for any single frequency audio. The flow of Figure 26 can be used to determine the existence of any single frequency audio. The flow enters the decision diamond 554. If no audio is detected, the flow proceeds to block 558, where the Dp and Dn counters are reset (zero) and the flow enters block 582, which indicates that the audio is not detected, and then proceeds to block 211 in FIG. However, if an audio is detected, the flow proceeds to block 5 5 6 where the detected audio is related to a predetermined single-frequency audio. Therefore, the flow of FIG. 27 can be used to execute blocks 5 5 6. The flow 86017 -83- 200417167 enters the decision diamond 560, which determines whether Dr is zero. If so, the predetermined frequency is not determined at block 556 (e.g., block 618 of Fig. 27), and the flow proceeds to block 558 where the counters Dp and Dn are reset. If not, however, the process proceeds to a decision diamond 562, which determines whether Dr is greater than zero. If so, the flow advances to block 4 where the positive phase counter is incremented; otherwise, the flow advances to block 566 where the negative phase counter is incremented. After block 564 or 566, the flow passes point g to block 568, where Flagpositive (Fp) and Flagnegative (Fn) are reset (zero). The process proceeds to decision diamond 570, where if Dp is greater than Lmin.p, Fp is set to one at block 572, otherwise the process bypasses block 572 and enters decision diamond 574. The decision diamond 574 determines whether Dn * is greater than Lmin-n 'if yes' Fn is set to one at block 576. If not, the flow bypasses block 576 and proceeds to decision diamond 578. In determining diamond 578, if Fp and Fn * are zero (that is, if FP + Fn is zero), the flow proceeds to block 582, indicating that the audio is not detected. That is, if no counter (Dn or Dp) is greater than a certain minimum value (for example, Lmin-p or Lmin-n, respectively), the Ui does not detect that audio is needed. However, if Fp + Fn is not zero, the process proceeds to a diamond 580 representing a decision to detect audio. If there is only one counter greater than Lmin (Dp or Dn), Fp + Fnf will be greater than one, and the flow proceeds to block 584, which indicates that the audio required for detection is inverted without correlation sign. If both Dp and Dn are greater than their respective Lmins, the flow proceeds to block 586, which indicates that the audio required for detection is inverted using the correlation symbol. If the R (n) average level is the same during the correlation sign inversion, it indicates that the phase is inverted. Therefore, the flow of FIG. 25 combines the flows of FIGS. 26 and 27 and detects a phase inversion. An alternative embodiment recognizes a phase change (not necessarily 180) within a given single frequency audio by detecting a sharp change in P (n). -84-86017 200417167 It should be noted that the description up to this point has assumed that there is no non-adaptive filter 64 in the adaptive filter unit 28 (see FIG. 4), so the reference or coefficient of any adaptive filter 28 The adaptive filter 62 in the reference adaptive filter unit 28 is similar. Therefore, in the previous description, it is not necessary to refer to the adaptive filter 62 separately from the adaptive filter unit 28. However, in the following description of FIGS. 28 to 36, the non-adaptive filter 64 may exist and be considered as part of the adaptive filter unit 28. Therefore, the coefficients of the adaptive filter 62, as used throughout the above description, since the adaptive filter unit 28 may include a combination of various filters (such as the adaptive filter 62 and the non-adaptive filter 64), The coefficients or taps of the adaptive filter 62 will now be more specifically referred to. As mentioned above, the adaptive filter 62 tracks the echo introduced by the merging 16, and thus usually requires a large number of taps. For example, in order to follow the entire pulse response of FIG. 37, the adaptive filter 62 (assuming a sampling rate of 8 kHz) of the adaptive filter unit 28 requires 256 taps, which spans 32 milliseconds to cover the entire pulse response. As the number of taps of the adaptive filter 62 increases, the computational complexity increases and the convergence speed generally decreases. The method described above with reference to Figures 20 to 24 provides a purely delayed debt test so that the adaptive filter 62 uses a sparse window covering the impulse response after pure delay. The method described below with reference to Figs. 28 to 36 is about a mechanism for shortening the range of the echo path. That is, in addition to detecting fine-tuning pure delay, it also detects and shrinks dispersion time to shorten the echo path range of the impulse response. As will be explained, a specific embodiment is to add a fixed or adaptive chirper for the purpose of the number f to reduce the residual echo to a minimum. As illustrated in Figure 37, the impulse response is really zero and poles. Zero prevents the corresponding frequency response, while poles enhance the corresponding frequency response. Therefore, by adding a filter-85- 86017 200417167 filter or a filter to compensate for the poles, the impulse response can be compressed and a smaller number of taps are required. For example, assuming that the IIR filter has a transfer function H (z) represented by the ratio b (z) / a (z), the filters A, (z) can be designed to compensate for the poles of H (z) such that H (z) * A '(z > B (z). A specific embodiment illustrated in FIG. 2 uses selective non-adaptive filters 3 1 and 35, so that the output of non-selective filter 3 (that is, sin 39) is equal to and The echo of the non-adaptive filter 3 1 convolution. However, the existence of the non-adaptive filter 3 1 immediately following the notch wave> Jie Bo Yi 4 5 introduces distortion into the Sin 37 that needs to be compensated. Therefore 'non-adaptive The filter 35 may introduce a reception error signal 46 and generate a filtering error signal 47. It is assumed that the non-adaptive filter 31 is a FIR filter having a transfer function A '(z), and the non-adaptive filter 35 is a transfer function 1 / A, ⑺ inverts the IIR filter. However, A, ⑻ needs to be limited because the zero of A, (z) of the FIR filter 31 becomes the pole of 1 / A '(z) of the inverting IIR filter 35. These The limitation of zero of A '(z) will be further explained below, which prevents the poles of the non-adaptive IIR filter 35 from amplifying the error signal 47. Alternative embodiments may use non-suitable Different configurations of adaptive filters. For example, 'non-adaptive filter 35 is not placed at the output of the adder 34, but is placed before the adder 34 and is at the outputs of the non-adaptive filter 31 and the adaptive filter 62 (which can be Produces the same network effect). In this specific embodiment, the non-adaptive filter 3 1 immediately next to the non-adaptive filter 35 can effectively eliminate the echo, so that no filter is needed between Sin 38 and Sin 39 (that is, Sin 39 And Sin 38). The adaptive filter 28 can then be designed to include a selective non-adaptive filter 64 (similar to the non-adaptive filter 35). Therefore, only one additional filter is required in a specific embodiment. However If the IIR filter is used for the non-adaptive filter 64, the stability limitation is still required. That is, all the roots of the number 86017-86-200417167 defined by the coefficients of the filter 64 should be less than one (that is, within the unit circle), below It will be explained in detail. It should be noted that for the transfer function H (z) = W, the root of W corresponds to zero of H (z) and for H (z) = 1 / W, the root of W corresponds to H (z). Pole. Selective filters 31, 35, and 64 do not have the same coefficients as the main The adaptive filter 62 is periodically non-adaptive when it is adaptive. Usually they can be regarded as adaptive filters whose rate is driven by events. '· Fig. 28 is a block 213 of Fig. 9 according to a specific embodiment of the present invention. Part of the process. The process begins with a decision diamond 626, which determines whether to start adaptive filter repair shortening estimation. If not, the process bypasses the process of Figure 28 and continues to block 212 of Figure 9. However, if started, the process Enter decision diamond 628. The adaptive filter shortening estimation can be started in a variety of different ways. For example, it can start automatically, such as in response to a system reset. Alternatively, it can be activated at any time with different delays in the delay unit 66 (if present) of Figure 4 or whenever a new merger is detected. The coefficients selected for non-adaptive filter 64 or non-adaptive filter 詻 31 and 35 depend on the specific union 16, because each different union can have a different impulse response, which has a different pure delay or a different dispersion time. In a specific embodiment, at the beginning of a call or based on changes that affect mergers (for example, based on call transfer or call transfer), the pure delay estimation described above with reference to FIGS. delay. To obtain the filter coefficients for the non-adaptive filter 64 or the non-adaptive filters 31 and 35, the method described with reference to FIG. 28 is used to determine both pure delay and dispersion. The pure delay calculation in Figure 28 is usually more accurate, however, it usually takes a long time to decide. Therefore, in addition to reducing the effective number of coefficients required by the adaptive filter 62, the method of Fig. 28 can "fine-tune" the pure delay estimates provided by Figs. 20-24. The 86017-87-200417167 method of Figure 28 determines that any delay element 66 needs to be added to compensate for the additional pure delay of the additional filter (64 or filters 31 and 35). That is, as will be explained below, increasing the filter for shortening the dispersion time also attempts to slightly increase the number of pure delays, so the delay of the 'delay unit 66 (originally determined by the method of Figs. 20 to 24) can be updated. If the monitoring mode of FIG. 24 is used, each time the ERLE decreases below the ERLE limit ', a new pure delay for the delay unit 66 is determined. In addition, the adaptive filter shortening estimation option of Fig. 28 can be activated in response to the ERLE falling below the ERLE limit (that is, in response to the new pure delay determined for the delay unit 66 by the flow of Fig. 21). In an alternative embodiment, the processes of FIGS. 20 to 24 may shorten the estimation option without an adaptive filter; or, similarly, the adaptive filter shortening estimation option may be used in an echo canceller without the pure delay of FIGS. 20 to 24. Estimation method. Alternatively, in the echo canceller having the method of Figs. 20 to 24, the adaptive filter shortening estimation option may be activated independently of the method of Figs. 20 to 24. Similarly 'if option is not enabled' (or if option is still used to determine new coefficients for adaptive filter 62 and coefficients for additional non-adaptive filter 64 or additional non-adaptive filters 31 and 35), additional filters or filters The filters can simply be bypassed (or they can pass the signal without filtering). If the option is activated in decision diamond 626, the process enters decision diamond 628, which determines whether ERLE 疋 is good enough. (ERLE can be calculated as the above formula 26, where ERLE corresponds to the ratio between PSin and perror, and where pw and dagger can be calculated using the above formulas 1 and 2.) To determine whether erle is good enough, it can be compared with a limit Compare. For example, the limit can be set to a value greater than 20 dB, or it can be set in the range of 30 to 40 dB. Generally, the higher the ERLE, the better the signal 86017 -88- 200417167 (because the lower the error perrcr). ERLE is high enough when no Sgen (proximity talker signal) is present, because otherwise ERLE decreases. Alternatively, it may determine whether a near-end talker signal exists from the above-mentioned near-end signal detector 26 before continuing to determine whether ERLE is present and comparing a limit value. If there is a near-end talker signal, or if ERLE is not good enough, the process bypasses the rest of FIG. 28 and continues to block 212 in FIG. However, if the ERLEs are good enough (above the limit), the flow proceeds to block 630. That is, the adaptive filter shortening estimation option should be performed when a good signal is present and an erroneous signal 46 is obtained from the good echo estimate 48. It should be noted that in alternative embodiments, many signals in the system may be used to determine whether a good signal for the execution option is present. In block 630, a pure delay and dispersion based on the current coefficients of the adaptive filter 62 is determined. (It should be noted that block 630 will be explained in detail with reference to FIG. 29.) After block 63, the flow proceeds to block 632, where the coefficients of the additional non-adaptive filter 64 or filters 31 and 45 are determined according to the pure delay and dispersion determined in FIG. 63. w and new coefficients corresponding to the new shortened version of the adaptive filter 62. (It should be noted that block 632 will be described in detail with reference to FIG. 30). The flow then proceeds to decision diamond 634, which determines whether the new configuration is good enough. That is, different criteria can be used to determine whether the new configuration is satisfactory. For example, in a specific embodiment, if the number of new configuration coefficients after reduction is still greater than the number required to reduce the coefficients, the method of block 632 may be repeated to obtain a further reduction in the coefficients. Alternatively, it may be decided that the diamond 634 does not exist so as to perform only one-item iteration, and the result of the block 632 is deemed sufficient. That is, the decision made in block 632 is used. If the new configuration of the diamond 634 is determined to be good enough, the flow continues to block _ 'where the adaptive filters 62 are regrouped and cheap. 86017 -89- 200417167 The new coefficients of the adaptive wave filter 62 are loaded into the adaptive filter 62 and the adaptive filter 62 is used to combine the non-adaptive filter 64 or the combined non-adaptive filter 31 and 35. (It should be noted that block 636 will be described in detail with reference to FIG. 31). Note also that the delay value in the 'delay unit 66 in block 636 can be updated by adding any delay required (adding a non-adaptive filter to the existing delay value in delay 66). Flow then proceeds to block 638, where the filter shortening estimation option is turned off. That is, the flow of FIG. 28 is usually not performed on a per sample basis. It is performed only when needed ', such as in the case described above with reference to an example of an example of adaptive filter shortening estimation options. However, in an alternative embodiment, the flow of FIG. 28 may be performed on a per-sample basis. It should be noted that in the specific embodiment illustrated in Fig. 28, blocks 630 to 638 are executed continuously after ERLE is determined to be sufficiently good. However, in alternative embodiments, blocks 630 to 638 (or a subset of blocks 630 to 638) may be started as separate threads that execute in parallel with other tasks of the echo canceller 20. After completing the flowchart, the method of FIG. 28 may warn the echo canceller 20 that the results are ready to update the adaptive filter 62. Alternatively, it may warn the echo canceller 20 that the entire filter shortening has been completed. For example, a signal or An interrupt can be provided to the echo canceller 20 to indicate completion of blocks 630 to 638 (or a subset of blocks 630 to 638). Figure 29 illustrates a portion of block 630 of Figure 28. That is, the flow of Figure 29 is purely delay Here comes a specific embodiment of the dispersion of the current coefficients of the adaptive filter 62. The flow starts at block 640, where the value of the coefficient of the adaptive waver 62 is moved to the ring buffer. That is, the adaptive filter 62 filter is adopted A snapshot of the coefficients is stored in a circular buffer of size ^, which has positions 0 to N-1. The current coefficient η of the adaptive filter 62 is available η = [h〇, ..., 86017 • 90- 200417167 hN -i] & shows' where h❹, ···, hN i corresponds to the coefficient and n corresponds to the adaptive filter 62 coefficient or the number of taps. Therefore, the value corresponding to w is stored in the position "n MOD N" in the ring buffer. Where n corresponds to the number of samples and r | x | "indicates" x value "(and corresponds to a positive value). The expression "n MOD N" corresponds to the η modulus, which refers to the remainder of the operation η / N. For example, if ν is 256 and n is 270, n MOD Ν refers to 14 ′ where | center. | From "position 27o" (which is outside the ring buffer of size n) to position 14 of the ring buffer. Therefore, if the value of η is greater than n, the value of N can continue to be subtracted from η until η falls within the range of 0 to ν-1. Similarly, if the value of η is less than 0 ', the value of ν can be continuously added to η until η reaches a range of 0 to N-1. The process then proceeds to block 642, where for each coefficient, h, energy E (η) (where η = 0 to N-1} is taken as the sum of the numerical values in the sliding window of the size LW. In a specific embodiment, LW is the length of the target window size, that is, the number of taps or coefficients after reducing the effective number of coefficients of the adaptive filter 62. For example, in a specific embodiment, LW can correspond to a sliding window with a size of 10 samples, where Each tap system needs a filter length. Therefore, if] ^ is 256 (representing the 256 coefficient h of the adaptive filter 62), then determine the 256 value of E (n), where each 256 value of E (n) It is the sum of 10 values (corresponding to 10 samples of LW). E (n) can therefore be expressed as the following formula 40. Formula 40: five W = where 11 = 〇, 1, ..., N-1 / * 〇 In the above formula (and other formulas described in this article), it should be noted that the symbol [χ] N corresponds to X MOD Ν. Then the flow proceeds from block 642 to block 644, where the delay D is set to the position of the energy peak negative LW. That is to determine e (sliding window) Internal energy of LW) After the value of N of 86017 -91- 200417167, the point where the largest e appears negative LW (at the time of sample ) Corresponds to the pure delay of the impulse response. Therefore, D can be expressed as shown in Equation 41. Equation 41: D = arg (max E (n))-LW where n = 〇, 1, ..., n-l In the above formula, The maximum E (n) refers to the maximum value of E among the N values of E, and arg (maxE (n)) refers to the parameter or point where the maximum E appears, where "parameter" corresponds to the sample time. Therefore, D corresponds to a pure delay. The process continues Go to block 646, where the dispersion time corresponds to the number of samples between d and the next position (where E is less than the predetermined limit). That is, E (n) (corresponding to the impulse response value) is in the range η == 0, 1, ... · The general trend of N-1 can be described as generally increasing toward the maximum peak and then decreasing back. Therefore, after reaching the maximum value, Ε (η) decreases, which corresponds to points outside the predetermined limit range The end of the dispersion time, where the dispersion time is thus the number of samples between D and the point (sample time) after which E (η) reaches its predetermined limit. The predetermined value can be set to any value indicating the end of the dispersion time. For example, In a specific embodiment, it can be set to 192 samples (that is, 24 milliseconds at an 8 KHz sampling rate) Fig. 30 is a specific embodiment of the block 632-part of Fig. 28, in which (1) the non-adaptive filter coefficient W (for the non-adaptive filter 64 or the non-adaptive filters 31 and 35) and (2) A shortened version of the adaptive filter 62. The process starts at block 648, where a new filter coefficient w is determined (for the non-adaptive filter 64 or the non-adaptive filters 3 1 and 35) (note block 648 (Details will be described with reference to FIGS. 32 to 36). The process then proceeds to block 650, where the coefficient w is the current adaptive filter 62 coefficient convolution (that is, using the snapshot taken in block 640 of Figure 29) to determine the shortened filter coefficient B, where B includes the addition of a non-adaptive filter 64 or New coefficients for adaptive filter 62 after 31 and 35. The flow proceeds to 86017 -92- 200417167 block 652, where the new pure delay D and the dispersion time of the filter coefficient B are shortened. Therefore, the process of FIG. 29 and equations 40 and 41 can be used to complete block 652. The flow then proceeds to block 654, where from B (that is, a portion of b with a predefined length), the new adaptive filter coefficients for the adaptive filter 62 are determined and the maximum number of adaptive filter coefficients is selected (i.e., samples in the B selection section) Quantity). Fig. 31 illustrates a specific embodiment of block 636-Shaofen of Fig. 28, in which the adaptive filter 62 is reconfigured. The flow begins at block 656, where the shortening factor previously determined at block 654 of Figure 30 replaces the current adaptive wavelet coefficient Η. The flow proceeds to block 658, where the new coefficient w (determined in block 648 of Fig. 30) is loaded with a non-adaptive filter (filter 64 or filters 31 and 35). Therefore, by loading W into a non-adaptive filter or filter, they can be activated so that the adaptive filter 62 has a reduced filter length. Flow then proceeds to block 660, where the delay unit 66 within the adaptive filter 28 is updated with the new delay. For example, a specific embodiment may simply update the delay unit 66 with the new decision pure delay d. Alternative embodiments may determine the delay stored in the current delay unit% and update the existing value as needed. Alternatively, if the new delay has not changed much from the existing delay in the delay unit 66, the delay unit% may not be updated at all. Similarly, in block 660, once the adaptive filter & loads the new coefficients in block 656, it must be configured to adapt the number of new coefficients. Fig. 32 is a specific embodiment of block 648 of Fig. 30, in which a new filter coefficient W (corresponding to filter 64 or filters 31 and 35) is determined. AZ diamond 662 'which determines whether any pre-calculated filter coefficient% is: For example, there may be a library that has been pre-calculated, which includes various corresponding combinations of different combinations and -93- 86017 200417167 w, so the new w can be simply selected from this library, and the process can be borrowed By convolving the adaptive filter coefficients from all the existing Ws in the library and taking the one that provides the best performance, enter box 65 of FIG. 30. Alternatively, a single pre-calculation w can be used that best represents different conditions. Therefore, w can be calculated off-line in a variety of different ways, one of which will be described with reference to Fig. 36, so that pre-calculation W can be used. If the filter coefficient W is not pre-calculated, the flow proceeds to block 664 'where w can be found using any method that determines the new filter coefficient. Various specific embodiments for determining W will be described in detail with reference to Figs. 33 to 35. Flow then proceeds to block 666, where the root of W is determined. For example, w can be expressed as W = [W0, W1, ..., WM "], and its towel w., W1, ..., ~ corresponds to the filter coefficients and M corresponds to the number of filter coefficients, so that w (z) can be expressed Equation 42 is shown below: Equation 42: W (z) = (wozM-k WlzM-2 +… + Wm 2Z + Wm i) z1.m To determine the root of W, set W (z) to 0 and solve z, where z has an answer of Mβ1. Therefore, the root ruler of the hip (2) can be expressed as ruler = [1 * 0, 1 ^. ", ~ _1], where the root includes a complex number and its conjugate. W (z) = 0 can also be expressed as Equation 43 as shown below: Equation 43: W (z) = 0 = (z-r〇) (z-Γι) ... (ζ _ ~ 2) (ζ _ Γμ ι), the μ process then proceeds to block 668, where additional restrictions on the root are added so that | can be used in FIR or IIR processing mode and remains stable. For example, if w is used for implementation, no restriction is required to ensure stability, but if used for nR implementation, the root must be within the unit circle. The unit circle refers to the inner circle of the plane defined by the X axis corresponding to the real quantity and the y axis corresponding to the virtual quantity. Draw the circle and the origin of the element (the intersection of the X and y axes, corresponding to 〇 on the X and y axes), and the radius is 丨. For 86017 • 94- 200417167, the root rk of each W (z) that is not located in the circle of the unit is transposed so that it lies in the circle of the unit. Alternatively, the root is not required to be within the circle of the unit, and the addition can be limited so that the W (z) root is within a circle with a radius of p centered at the origin, where p is less than ^. Therefore, in this specific embodiment, for each W (zM ^ rk that is not located in a circle of radius p, the root rk is transposed so that it is located in the circle of a unit of radius p. Therefore, if W (ie, the value of rk) is greater than p, the transposition can be expressed as the formula: Formula 44: Ή where P < 1 Pay attention to the above formula < The plural common rails shown. The flow then proceeds to block 670, where the new filter coefficient Wnew # is constructed from the modified root. That is, if any root must be modified due to the restriction of adding block 668, the modified root can be used to determine a new root which can be substituted into the above formula r0, ..., rM1 to provide a new w (z) (ie wnew). wnew is then used as the filter coefficients for the remainder of the flow, which continues to block 650 of Figure 30). Therefore, FIG. 32 can be used to restrict or project the root of w. FIG. 36 illustrates a specific embodiment of a method for offline design of filter coefficients w in tandem group impulse response estimation. The flow begins at block 7 () 4: which; for all design methods, each line is pulsed in series and the answer W should be determined. Therefore, if two design methods are used for the eight channel pulses in the tandem group: Yes, a total of 16 answers (hip to trade) are determined. In addition, the method of figure% is not limited to any decision method. The flow then proceeds to the block, where the convolution Bk of each W-estimated W ′ is estimated, and the impulse response of each channel in the tandem group. Therefore, in the current example, there are 16 answers (w. To ~) and 8 tandem group responses, and a total of 128 convolutions are estimated. For any answer w, each Bk can therefore be expressed as Bk = [bk〇, bk "^^ 86017 -95- 200417167 bk, i, ..., bk, Ni are coefficients and N is the length of Bk. It should be noted that [k] 8 represents the number of channels in the tandem group. The flow proceeds to block 708, where, for each Bk, a dispersion region with the required length of the maximum energy (ie, the length of the target filter) is located. That is, the maximum energy dispersion region can use formulas 40 and 41 Positioning, where LW corresponds to the length of the scattered area. Therefore, the formula of block 708 can be expressed as follows. Formula 45: as far as possible, n | where η = 0, 1, ..., n-1 / = 0 The above formula is the same as the above Equation 40 is similar. In Equation 45, N is the length of a specific Bk and Ek (n) corresponds to the energy in the sliding window LW (corresponding to the required length of the dispersed area). Therefore, the energy value of N (Ek (0),. &Quot;, Ek (N-1)) is determined for each heart. Therefore, the dispersion region with the maximum energy for each Bk can be determined using the following formula. EQUATION 46: Dk = arg (max Ek (n))-LW where η = 〇, 1, ..., N-1 Formula 46 is similar to the above formula 41. In Formula 46, Dk corresponds to the purity of the maximum energy Bk. Delay, so the dispersed area starts with Dk and ends with Dk + LW and has the maximum energy. (Alternatively, the end of the dispersed area can be defined as the point where the energy Ek (n) falls below a predetermined limit, as in the above reference formula 41.) Therefore, for each Bk, the maximum energy dispersion area is determined. The flow then proceeds to block 710, where for each Bk, the estimated merit value pMk. The merit value is defined as the maximum energy, the maximum Ek (n) (from the block 708) and the total energy Ek of Bk. Therefore, Ek can be defined using the following formula: Equation 47: / = 0 In the above formula, N refers to the length of Bk. The figure of merit can therefore be expressed as follows. 86017 -96- 200417167 Equation 48 : Where n = 〇1, N-1 In the above formula, N refers to the length of Bk. The flow proceeds to block 712, where the average figure of merit fmavg used for all channel impulse responses is determined. Each answer wk (k = 0 in the above example) 1, 1, 15) will have its own mean figure of merit fmavg. The flow proceeds to block 714, where the selective filter w is selected so that FMavg is maximized among all possible design methods. The method of Figure 36 can be taken offline Implementation, and The final selection W can be stored in the echo canceller 20 and loaded into the non-adaptive filter 64, 31, or 35 as needed. Response Note Although the above description of W assumes that the additional filter is non-adaptive, adaptive filters are available To replace the non-adaptive filters 64, 31, or 35. However, 'to ensure stability as described above, W needs to add restrictions, if the filter is adaptive, the stability restrictions may need to be added on a per sample basis, Because filter adaptation can lead to unstable filters. 33 to 35 provide a possible design method for determining W. For example, FIGS. 33 to 35 may correspond to the three design methods used in block 704 of FIG. 36. Alternatively, any or all of the methods of Figs. 33 to 35 may be performed by the echo canceller 20 in operation. In a specific embodiment, the echo canceller 20 can perform all three design methods to determine W (e.g., block 664 in FIG. 32) and finally (after block 632 in FIG. 28) decide which one provides the best solution. It should be noted that different methods can provide the best solution after modifying the roots of the best solution after the reconstruction of the new filter coefficients from the modified root (block 668 in Figure 32). Therefore, different methods can be analyzed or selected by the echo canceller 20 at different times according to specific embodiments. Alternatively, a 'single design method may be used by echo cancellation 86017 -97- 200417167. Fig. 33 is a part of block 664 of Fig. 32, which corresponds to a method for determining new filter coefficients according to a specific embodiment of the present invention. The flow starts at block 6 7 2 ′ where the scattered area with adaptive filtering of 6 2 coefficients is moved to the ring buffer to compensate for the delay D (calculated in block 644). Therefore, the delay compensation coefficient G can be expressed as G = [g0, gi, ..., gN-i], where g0, gl, ..., gN is the coefficient of the delay compensation coefficient G, and N is the length of the adaptive filter 62. Therefore, the relationship between 'H (corresponding to the uncompensated coefficient of the adaptive filter 62 of the original snapshot used in box 640 in FIG. 29) and G can be expressed as follows. Formula 49 · • F = A [dwL where i = 〇 , L, · η, N-1 In formula 49, gi is a delay compensation coefficient, which is stored in the corresponding position i of the ring buffer. Fig. 3 8 illustrates a specific embodiment of the exemplary impulse response of Fig. 37 , Which has been compensated by the time delay D (corresponding to T1 in Fig. 37), so that the impulse response starts from the dispersion time (defined by T4 + T2 in Fig. 37). Therefore, the chirp coefficient represents the impulse response in Fig. 37 and the G coefficient represents The time-compensated impulse response in FIG. 38. The process proceeds to block 674, where the required filter length is defined. For example, in a specific embodiment, as described above, the required filter length is defined as 10 (where the impulse response dispersion time requires Compressed into 10 samples). Refer to the example in Figure 38 'Required The waver length corresponds to the time between D0, 0, and 31, where 0 is the beginning of the dispersion time (also corresponds to (the first coefficient of 3, because G has delayed compensation)) and S1 defines the end of the required filter length. Once the required filter length is determined, the coefficients of the scattered area within the required filter length are cleared to define the residual coefficient, V. That is, gi is set to 0, where 1 = 0, 1,..., S1. Therefore, v may be Expressed as v = [〇, ··, 〇, v ,, ..., 86017 -98- 200417167 vK_i], where K is the number of V non-zero components, and each V non-zero coefficient is defined as follows. Formula 50: Vj = gsi + j where j = 0, 1, .., κ-1 Therefore, referring to the example in FIG. 38, the G coefficient corresponding to time T5 is set to zero, and the V coefficient represents residual distortion, that is, the impulse response part corresponding to time T6. The flow proceeds to blocks 676 to 680, and its operation is to equalize the residual distortion, V. In block 676, the fast Fourier transform (FFT) of V is calculated. The flow proceeds to block 678, where the inverse I of FFT (V) is calculated, Where I = 1 / FFT (V). The flow proceeds to block 680, where Wi is used as I Inverse FFT (IFFT) calculation, where W ^ IFFTCI). Therefore, the inversion of Wj V can be used to equalize residual distortion V. The flow proceeds to block 682, where W is determined from a predetermined length W! Window with the maximum energy (and The estimated channel dispersion in Figure 29 is the same), where the predetermined length is the required number of adaptive filter taps. The flow then proceeds to block 684, where the filter coefficient W is normalized, for example, by the Euclidean number of W ( Ie L2 standard). Fig. 34 is an alternative method for determining the coefficient W according to a specific embodiment of the present invention. The flow begins at block 686, as described above, where the filter length required to use the delay compensation filter coefficient G (from block 672 and equation 49) is defined, and the convolution matrix C is determined. The convolution matrix C is defined as follows.

公式 51 ·· C = SL · ConG SL對應選擇矩陣,其可表示如下。 公式 52 : SL = [0;/] 公式52中,0係一(N + Μ - L - l)xL零矩陣,I係一(N + M-L - 1)χ(Ν + Μ - L - 1)恒等矩陣。此公式中,N對應G長度, 86017 -99- 200417167 Μ對應W長度(完成需要的適應性濾波器長度之非適應性濾 波器分接預定義數量),L對應需要的適應性濾波器長度。 ConG對應G卷積矩陣,可表示如下。 公式53Equation 51 ·· C = SL · ConG SL corresponds to the selection matrix, which can be expressed as follows. Formula 52: SL = [0; /] In Formula 52, 0 is a (N + Μ-L-1) xL zero matrix, and I is a (N + ML-1) x (N + Μ-L-1) Identity matrix. In this formula, N corresponds to G length, 86017 -99- 200417167 M corresponds to W length (predefined number of non-adaptive filter taps to complete the required adaptive filter length), and L corresponds to the required adaptive filter length. ConG corresponds to a G convolution matrix and can be expressed as follows. Formula 53

ConG = g2 0 g〇 0 Si g〇 * · • 9 * · ο ο οοοConG = g2 0 g〇 0 Si g〇 * · • 9 * · ο ο οοο

Sn-\ -(Ν+Μ-\)χΜ 矩陣C因此係藉由忽略其初始l列得自延遲補償滤波器係 數G之卷積矩陣ConG,其將在此設計方法之末定義縮短通 道係數。The Sn-\-(N + M-\) χM matrix C is therefore a convolution matrix ConG derived from the delay compensation filter coefficient G by ignoring its initial l columns, which will define the shortened channel coefficients at the end of this design method.

流程進入方塊688,其中bw定義為以列向量放置之公式51 中矩陣C的第一列。流程進入方塊690,其中計算矩陣a。 公式 54 : A = CTC 公式54中,符號CT指矩陣C之換位。流程進入方塊692 , 其中Aw =吣給定公式系統解W。流程接著進入方塊694, 其中正規化濾波器係數W。熟習技術人士會立即識別上述 答案對應系統CW = [1,〇,···〇]τ最小均方錯誤答案,其試圖藉 由將適應性滤波器62係數總體卷積視為W均衡失真。The flow proceeds to block 688, where bw is defined as the first column of the matrix C in Equation 51 placed in a column vector. Flow proceeds to block 690, where matrix a is calculated. Equation 54: A = CTC In Equation 54, the sign CT refers to the transposition of matrix C. The flow proceeds to block 692, where Aw = 解 given formula system solution W. The flow then proceeds to block 694, where the filter coefficients W are normalized. Those skilled in the art will immediately recognize that the above-mentioned answer corresponds to the system CW = [1, 0, ...] τ minimum mean square error answer, and it attempts to treat the overall convolution of the adaptive filter 62 coefficients as W equalization distortion.

圖35係根據本發明另一具體實施例用以決定係數w之替 代方法。流程始於方塊696,如上所述,其中定義使用延遲 補償濾波器係數G(來自方塊672及公式49)所需要的濾波器 長度,並決定卷積矩陣C。因此圖35使用公式51定義之相同 C矩陣。流程接著進入方塊698,其中如圖34之方塊690計算 矩陣Α(見公式54)。流程進入方塊700,其中估WWTW/WTAW 86017 -100· 200417167 之最大答案。應注提供藉由矩陣A加權之W正 規化分接的能量比率,因此WTW/WTAW之最大答案將能量 WTAW(其條件係WTW = 1)減至最小。應注意WTW/WTAW等 於WTW/WTAW,其中I為恒等矩陣,使答案W係對應最大該 對(I,A)特徵值之通用化特徵向量,其可使用任何用於估計 特徵向量之現成演算法計算。流程接著進入方塊702,其中 在方塊700正規化濾波器係數W。 因此,圖33至35提供三種設計方法,其可用於決定濾波 器係數W。應注意圖33之方法嘗試均衡需要(目標)濾波器長 度外的殘餘失真。圖34之方法由於嘗試均衡失真同時將適 應性濾波器62係數總體卷積視為W更加整體化。然而,圖 34產生更多複雜公式。圖35之方法嘗試在適應性濾波器62 係數及W之卷積後將殘餘失真能量實際上減至最小。如上 所述,回音消除器20可實施全部方法,最佳答案係選擇在 修改W根之前或從修改根重新構造新濾波器係數W之後。 於前面的說明書中,已參考特定具體實施例來說明本發 明。然而,熟習技術人士應明白本發明可有各種修改及變 化,而不會背離如下申請專利範圍所提出的本發明之範疇 。例如,本文所介紹之任何方法可具體化為一個或多個電 腦硬碟上軟體、軟碟、3·5”磁碟、電腦儲存帶、磁鼓、靜態 隨機存取記憶體(SRAM)單元、動態隨機存取記憶體 (DRAM)單元、電可抹除(EEPROM、EPROM、快閃)單元、 非揮發性單元、鐵電或鐵磁記憶體、壓縮碟片(CD)、雷射 碟、光碟及任何相似的電腦可讀媒體。同樣,方塊圖可不 86017 -101- 200417167 同於說明的那些方塊,可有更多或更少方塊或不同地配置 。同樣,流程圖亦可不同地配置,包括不同地配置的更多 或更少步騾,或具有之步騾又可分成多個步驟或可彼此同 時執行之步驟。因此,說明書暨附圖應視為解說,而不應 視為限制,並且所有此類的修改皆屬本發明範嗜内。 關於特定具體實施例的優勢、其他優點及問題解決方案 已如上述。但是,產生或彰顯任何優勢、優點或解決方案 的優勢、優點、問題解決方案及任何元件,均不應视為任 何或所有申請專利範圍的關鍵、必要項或基本功能或元件 。本文中所使用的術語「包含」、「包括」或其任何其他變 化’都是用來涵蓋非專有内含項,使得包括元件清單的程 方法物°*"或裝置,不僅包括這些元件,而且還包括 ί明確列出或此類程序、方法、物品或裝置原有的其他元 【圖式簡單說明】 本發明將藉由範例 在這些範例及附圖内 件,並且其中: 及附圖來進行說明,但本發明未限定 ,其中相似的參考符號代表相似的元 圖1係根據本發明— 圖2係根據本發明— 音消除器; 项具體實施例之通信系統; 項具體實施例的圖〗之通信系統的回 圖3係根據本發明— 近端信號偵測器; 圖4係根據本發明一 86017 项具體實施例的圖2之回音消除器的 項具體實施例的圖2之回音消除器的 -102- 200417167 適應性濾波器; 圖5係根據本發明一項具體實施例的圖2之回音消除器 非線性處理器; %' 圖6至8係根據本發明各種具體實施例的圖2之回音消除 器的監測及控制單元之部分; ' 圖9係根據本發明一項具體實施例的圖2之回音消除器操 作的流程圖; 圖10至13係根據本發明一項具體實施例的圖2之回音消 除器的近端信號偵測器操作以及備份並恢復圖2回音消除 器適應性濾波器之濾波器係數的方法之流程圖; 圖14係根據本發明一項具體實施例用以監測圖2之回音 消除器增益的動態增益控制方法之流程圖; 圖15係根據本發明一項具體實施例用以監測圖2之回音 消除器適應性滤波器;慮波器係數分佈狀態㈣波器係數監 測方法之流程圖; 圖16至19係根據本發明一項具體實施例的圖2之回音消 除器内非線性處理器操作的流程圖; 圖20至24係才艮據本發明一項具體實施例的純延遲估計及 稀疏窗位置之流程圖; 圖25至27係根據本發明一項具體實施例的音頻偵測方法 之流程圖; 圖28至36係根據本發明_項具體實施例縮短回音路徑择 瞄的方法之流程圖;以及 圖37至38係根據本發明具體實施例的脈衝回應範例之流 86017 -103· 200417167 熟習技術人士可以發現為簡化及清楚起見,並沒有將圖 式中的元件依照比例繪製。例如,為了有助於瞭解本發= 的具體實施例,圖中部份元件的尺寸和其他元件比起來可 能過度放大。 【圖式代表符號說明】 10 通信系統 12 傳送器/接收器 13 介面 14 傳送器/接收器 15 介面 16 併合 17 控制 18 併合 20 回音消除器 22 回音消除器 24 通信網路 26 近端信號偵測器 28 適應性濾波器單元 30 監測及控制單元 31 非適應性濾波器 32 非線性處理器 33 增益控制 加法器 34 86017 -104- 200417167 35 非適應性濾波器 36 加法器 37 傳送輸入 38 傳送輸入 39 傳送輸入 40 接收輸出 41 串列信號 42 傳送輸出 43 接收輸入 44 接收輸入 45 DC凹口波濾波器 46 錯誤信號 47 錯誤信號 48 回音估計信號 49 DC凹口波濾波器 50 近端信號位準估計器 52 遠端信號位準估計器 54 傳送輸入信號位準估計器 56 背景處理器 58 近端信號偵測限值 59 選擇器 60 近端信號偵測器 62 適應性濾波器 64 非適應性濾波器 -105- 86017 200417167 66 延遲 68 信號位準估計器 70 近端信號位準估計器 72 遠端信號位準估計器 74 非線性處理器控制器 76 非線性處理器啟動控制器 78 非線性處理器關閉控制器 82 雜訊位準匹配器 84 輸出信號混頻器 86 適宜雜訊產生器 88 短期背景位準估計器 90 背景位準估計器控制器 92 長期背景位準估計器 94 背景位準配接器 96 適應性背景位準估計器 100 增益監視器 102 濾波器係數監視器 104 十進制滤波器 106 十選一取樣器 108 十進制滤波器 110 十選一取樣器 112 比較器 114 近端信號偵測器 116 回音返回損失增強估計器 86017 - 106- 200417167 118 功率估計器 120 功率估計器 122 適應性濾波器 124 最大值定位器 126 延遲確定 128 適應性濾波器系統 130 估計延遲 132 雜訊產生器 134 功率估計器 136 延遲 138 延遲 140 乘法器 142 乘法器 144 加法器 146 數值 148 低通濾波器 150 儲存器 152 平滑相關器 154 延遲 156 乘法器 158 乘法器 160 低通濾波器 162 低通濾波器 164 振盪器 86017 - 107- 200417167 166 音頻指示決定單元 168 音頻指示器信號 200 流程圖 202 開始 204 ^ 206 ^ 208 - 209 方塊 210 監測及控制適應性漉波器 211 、 212 、 213 、 方塊 214 、 216 、 218 220 決定菱形 222 方塊 224 決定菱形 226 > 228 - 230 方塊 232 決定菱形 234 結束 252 方塊 254 決定菱形 256 、 258 方塊 260 決定菱形 262 ' 264 方塊 266 決定菱形 268 > 270 方塊 276 方塊 278 > 280 > 282 決定菱形 284 、 286 、 288 、 方塊 86017 - 108- 200417167 290 293 296 300 304 312 322 326 ' 332 334 336 33 8 340 342 344、 348 350 354 356 360 362 400 406 412 291 > 292 294 > 295 決定菱形 298 方塊 302 決定菱形 306 、 308 ' 310 方塊 314 、 316 、 318 狀態 324 決定菱形 328 、 330 方塊 決定菱形 方塊 決定菱形 方塊 決定菱形 方塊 346 方塊 決定菱形 352 方塊 決定菱形 358 方塊 決定菱形 方塊 402 - 404 決定菱形 408 、 410 、 方塊 414 -109- 86017 200417167 416 418 424 426 430 432 440 448 450 452 456 458 466 470 476 482 485 486 491 494 497 500 504 505 決定菱形 420 > 422 方塊 決定菱形 428 方塊 決定菱形 434 、 436 、 438 方塊 442 - 444 ^ 446 決定菱形 方塊 決定菱形 454 方塊 決定菱形 460 > 462 - 464 方塊 468 決定菱形 472 > 474 > 方塊 478 > 480 483 、 484 決定菱形 489 方塊 487 > 490 決定菱形 492 > 493 > 方塊 495 > 496 498 > 499 決定菱形 501 、 502 、 503 方塊 決定菱形 506 方塊 86017 •110- 200417167 508 決定菱形 510 方塊 512 決定菱形 514 、 516 、 518 方塊 520 決定菱形 521 、 522 方塊 523 決定菱形 524 方塊 528 、 529 決定菱形 530 、 532 方塊 534 、 535 決定菱形 536 > 538 方塊 540 決定菱形 542 、 544 、 550 、 552 方塊 554 決定菱形 556 、 558 方塊 560 > 562 決定菱形 564 > 566 > 568 方塊 570 決定菱形 572 方塊 574 決定菱形 576 方塊 578 > 580 決定菱形 582 、 584 、 586 ' 588 方塊 86017 - ill - 200417167 590 決定菱形 592 方塊 594 決定菱形 596 > 598 方塊 600 決定菱形 602 、 604 ' 606 ' 608 方塊 610 決定菱形 612 方塊 614 決定菱形 616 、 618 方塊 620 決定菱形 622 > 624 方塊 626 > 628 決定菱形 630 、 632 方塊 634 決定菱形 636 、 638 > 640 ' 642 > 644 、 646 ' 648 、 650 、 652 、 654 、 656 、 658 、 660 方塊 662 決定菱形 664 ' 666 ' 668 、 670 > 672 - 674 > 676 - 678 - 680 > 方塊 86017 -112- 200417167 682 688 694 700 706 712 684 690 696 702 708 714 686、 692 > 698 > 704、 710、 86017 -113-Fig. 35 is an alternative method for determining the coefficient w according to another embodiment of the present invention. The flow begins at block 696, as described above, where the filter length required to use the delay compensation filter coefficient G (from block 672 and equation 49) is defined, and the convolution matrix C is determined. Therefore, Fig. 35 uses the same C matrix as defined by Equation 51. The flow then proceeds to block 698, where the matrix A is calculated as shown in block 690 of Figure 34 (see equation 54). The process proceeds to block 700, where the largest answer of WWTW / WTAW 86017-100 · 200417167 is estimated. It should be noted that the energy ratio of W normalized taps weighted by matrix A is provided, so the largest answer of WTW / WTAW minimizes the energy WTAW (its condition is WTW = 1) to a minimum. It should be noted that WTW / WTAW is equal to WTW / WTAW, where I is the identity matrix, so that the answer W is the generalized eigenvector corresponding to the largest (I, A) eigenvalue of the pair, and it can use any ready-made algorithm for estimating the eigenvector Method calculation. Flow then proceeds to block 702, where the filter coefficients W are normalized at block 700. Therefore, Figures 33 to 35 provide three design methods that can be used to determine the filter coefficient W. It should be noted that the method of Fig. 33 attempts to equalize the residual distortion beyond the length of the (target) filter. The method of Fig. 34 is more integrated because it attempts to equalize the distortion while considering the overall convolution of the adaptive filter 62 coefficients as W. However, Figure 34 produces more complex formulas. The method of FIG. 35 attempts to minimize the residual distortion energy after the convolution of the adaptive filter 62 coefficients and W. As described above, the echo canceller 20 can implement all methods, and the best answer is to choose before modifying the W root or after reconstructing a new filter coefficient W from the modified root. In the foregoing specification, the invention has been described with reference to specific embodiments. However, those skilled in the art should understand that the present invention may have various modifications and changes without departing from the scope of the present invention as set forth in the following patent application scope. For example, any of the methods described in this article can be embodied as software on one or more computer hard disks, floppy disks, 3.5mm disks, computer storage tapes, magnetic drums, static random access memory (SRAM) units, Dynamic random access memory (DRAM) unit, electrically erasable (EEPROM, EPROM, flash) unit, non-volatile unit, ferroelectric or ferromagnetic memory, compact disc (CD), laser disc, optical disc And any similar computer-readable media. Similarly, the block diagram may not be 86017 -101- 200417167. The blocks described may have more or fewer blocks or be configured differently. Similarly, the flowchart may be configured differently, including More or fewer steps that are configured differently, or the steps that they have can be divided into multiple steps or steps that can be performed simultaneously with each other. Therefore, the description and the drawings should be regarded as illustrations, not as limitations, and All such modifications are within the scope of the present invention. The advantages, other advantages, and solutions to problems of specific embodiments have been described above. However, any advantages, advantages, or advantages of solutions are produced or highlighted , Problem solutions, and any elements should not be considered as key, necessary or basic functions or elements of any or all patented scopes. The terms "including", "including" or any other variations thereof "used herein It is used to cover non-proprietary inclusions so that process methods or devices that include a list of components include not only those components, but also explicitly listed or original procedures, methods, articles, or devices [Schematic description of the figures] The present invention will be illustrated by examples in these examples and the contents of the drawings, and among them: and the drawings to explain, but the present invention is not limited, where similar reference symbols represent similar meta-graphs 1 is according to the present invention— FIG. 2 is according to the present invention—a sound canceller; a communication system according to a specific embodiment; FIG. Is a diagram of a specific embodiment. Figure 4 is a -102- 200417167 adaptive filter of the echo canceller of Fig. 2 according to a specific embodiment of the echo canceller of Fig. 2 according to a specific embodiment of the invention. Figure 5 is a non-linear processor of the echo canceller of Figure 2 according to a specific embodiment of the present invention;% 'Figures 6 to 8 are monitoring and control units of the echo canceller of Figure 2 according to various specific embodiments of the present invention Part; 'FIG. 9 is a flowchart of the operation of the echo canceller of FIG. 2 according to a specific embodiment of the present invention; FIGS. 10 to 13 are the proximal ends of the echo canceller of FIG. 2 according to a specific embodiment of the present invention Flow chart of a signal detector operation and a method for backing up and restoring the filter coefficients of the adaptive filter of the echo canceller of FIG. 2; FIG. 14 is a diagram for monitoring the gain of the echo canceller of FIG. 2 according to a specific embodiment of the present invention; Flow chart of a dynamic gain control method; FIG. 15 is a flow chart of a method for monitoring an echo canceller adaptive filter of FIG. 2 and a filter coefficient distribution state of a wave filter coefficient according to a specific embodiment of the present invention; FIG. 16 to 19 are flowcharts of the operation of the non-linear processor in the echo canceller of FIG. 2 according to a specific embodiment of the present invention; FIGS. 20 to 24 are pure delay estimates and Flow chart of sparse window position; Figures 25 to 27 are flowcharts of an audio detection method according to a specific embodiment of the present invention; Figures 28 to 36 are methods of shortening echo path selection according to a specific embodiment of the present invention Flow charts; and FIGS. 37 to 38 are examples of impulse response examples according to the specific embodiment of the present invention. 86017-103 · 200417167 Those skilled in the art may find that, for simplicity and clarity, the elements in the drawings have not been drawn to scale. For example, in order to help understand the specific embodiment of the present invention, the dimensions of some elements in the figure may be excessively enlarged compared to other elements. [Illustration of Representative Symbols] 10 Communication System 12 Transmitter / Receiver 13 Interface 14 Transmitter / Receiver 15 Interface 16 Union 17 Control 18 Union 20 Echo Canceller 22 Echo Canceller 24 Communication Network 26 Near-end signal detection 28 Adaptive filter unit 30 Monitoring and control unit 31 Non-adaptive filter 32 Non-linear processor 33 Gain control adder 34 86017 -104- 200417167 35 Non-adaptive filter 36 Adder 37 Transmission input 38 Transmission input 39 Transmit input 40 Receive output 41 Serial signal 42 Transmit output 43 Receive input 44 Receive input 45 DC notch wave filter 46 Error signal 47 Error signal 48 Echo estimation signal 49 DC notch wave filter 50 Near-end signal level estimator 52 Far-end signal level estimator 54 Transmit input signal level estimator 56 Background processor 58 Near-end signal detection limit 59 Selector 60 Near-end signal detector 62 Adaptive filter 64 Non-adaptive filter- 105- 86017 200417167 66 Delay 68 Signal level estimator 70 Near-end signal level estimation 72 Remote signal level estimator 74 Non-linear processor controller 76 Non-linear processor enable controller 78 Non-linear processor shutdown controller 82 Noise level matcher 84 Output signal mixer 86 Suitable noise generator 88 Short-term background level estimator 90 Background level estimator controller 92 Long-term background level estimator 94 Background level adapter 96 Adaptive background level estimator 100 Gain monitor 102 Filter coefficient monitor 104 Decimal filtering Selector 106 Decimal Sampler 108 Decimal Filter 110 Decimal Sampler 112 Comparator 114 Near-End Signal Detector 116 Echo Return Loss Enhancement Estimator 86017-106- 200417167 118 Power Estimator 120 Power Estimator 122 Adaptability Filter 124 Maximum locator 126 Delay determination 128 Adaptive filter system 130 Estimated delay 132 Noise generator 134 Power estimator 136 Delay 138 Delay 140 Multiplier 142 Multiplier 144 Adder 146 Value 148 Low-pass filter 150 Storage 152 Smooth Correlator 154 Delay 156 Multiplier 158 Implementer 160 Low-pass filter 162 Low-pass filter 164 Oscillator 86017-107- 200417167 166 Audio instruction determination unit 168 Audio indicator signal 200 Flow chart 202 Start 204 ^ 206 ^ 208-209 Block 210 Monitoring and control adaptability 漉Wave 211, 212, 213, block 214, 216, 218 220 decide diamond 222 block 224 decide diamond 226 > 228-230 block 232 decide diamond 234 end 252 block 254 decide diamond 256, 258 block 260 decide diamond 262 '264 block 266 decision diamond 268 > 270 box 276 box 278 > 280 > 282 decision diamond 284, 286, 288, box 86017-108- 200417167 290 293 296 300 304 312 322 326 '332 334 336 33 8 8 340 342 344, 348 350 354 356 360 362 400 406 412 291 > 292 294 > 295 decide diamond 298 block 302 decide diamond 306, 308 '310 block 314, 316, 318 status 324 decide diamond 328, 330 block determine diamond block determine diamond block determine diamond Block 346 Block decision diamond 352 Block decision diamond 358 Block decision diamond 402-404 Decision diamond 408, 410, Block 414 -109- 86017 200417167 416 418 424 426 430 432 440 448 450 452 456 458 466 470 476 482 485 486 491 494 497 500 504 505 Decision diamond 420 > 422 block determines diamond 428 block determines diamond 434, 436, 438 block 442-444 ^ 446 determines diamond block determines diamond 454 block determines diamond 460 > 462-464 block 468 determines diamond 472 > 474 > block 478 > 480 483, 484 decide the diamond 489 block 487 > 490 decide the diamond 492 > 493 > block 495 > 496 498 > 499 decide the diamond 501, 502, 503 block determine the diamond 506 block 86017 • 110- 200417167 508 decide the diamond 510 box 512 determines diamond 514, 516, 518 box 520 determines diamond 521, 522 box 523 determines diamond 524 box 528, 529 determines diamond 530, 532 box 534, 535 determines diamond 536 > 538 box 540 determines diamond 542, 544, 550 , 552 party 554 decision diamond 556, 558 square 560 > 562 decision diamond 564 > 566 > 568 square 570 decision diamond 572 square 574 decision diamond 576 square 578 > 580 decision diamond 582, 584, 586 '588 square 86017-ill-200417167 590 decide diamond 592 block 594 decide diamond 596 > 598 block 600 decide diamond 602, 604 '606' 608 block 610 decide diamond 612 block 614 decide diamond 616, 618 block 620 decide diamond 622 > 624 block 626 > 628 decide diamond 630, 632, block 634, diamond 636, 638 > 640 '642 > 644, 646' 648, 650, 652, 654, 656, 658, 660, block 662, diamond 664 '666' 668, 670 > 672-674 > 676-678-680 > box 86017 -112- 200417167 682 688 694 700 706 712 684 690 696 702 708 714 686, 692 > 698 > 704, 710, 86017 -113-

Claims (1)

200417167 拾、申請專利範園: 1. 一種用以執行用於選擇性影響背景雜訊之—音頻信號 的非線性處理之方法,其包括: 選擇性估计該背景雜訊以產生—估計背景雜訊位準; 決定該估計背景雜訊位準是否超過一預定標準;以及 將預定背景雜訊選擇性注入該音頻信號。 2· —種回音消除器,其包括: 一適應性濾波器; 耦合至該適應性濾波器之控制電路;以及 核合至該控制電路之-非線性處理器,用以選擇性估 计月景雜訊,以及若偵測至少一近端信號及一遠端信號 之一用以中斷背景雜訊估計。 3 · —種用以執行近端信號偵測之方法,其包括: 決足' 一接收路經之'輸出的功率; 決定一錯誤信號之功率;以及 使用該接收路控之該輸出的該功率及該錯誤信號之 該功率偵測該近端信號是否存在。 4. 一種回音消除器,其包括: 一近端彳&號偵測為’其決定一接收路徑之一輸出的一 功率及一錯誤信號之一功率,以偵測是否存在一近端信 號; 耦合至該近端信號偵測器之一適應性滤波器; 耦合至該適應性濾波器之控制電路;以及 耦合至該控制電路之一非線性處理器。 86017 5· 種用以執行回音消除之方法,其包括: 執行用於消除回音之該目的的適應性滤波; 與執行適應性濾波之該步驟同時估計純延遲;以及 選擇性使用該純延遲以調整一適應性濾波器窗之一 位置。 6。一種用以執行回音消除之方法,其包括: 決定單獨估計延遲值;以及 執行該等單獨估計延遲值之非線性濾波,以產生一純 延遲;以及 選擇性使用該純延遲以調整一適應性濾波器窗之^ 位置;以及 執行用於消除回音之該目的的適應性濾波。 7· —種回音消除器,其包括: 用以消除回音之一第一適應性濾波器;以及 輪合至該第一適應性濾波器之一監測及控制單元,包 括一第二適應性濾波器之用以估計純延遲的該監測及 控制單元,其中該純延遲用於調整該第一適應性滤波器 之一適應性濾波器窗的一位置,以及 其中該第二適應性濾波器包含用以濾波單獨估計延 遲值以產生該純延遲之一非線性濾波器。 8· 種用以指示一通信信號内是否存在一音頻之方法,其 包括: 藉由一預定第一延遲延遲該通信信號,以產生一第— 延遲信號; 86017 -2- 200417167 藉由一預定第二延遲延遲該通信信號,以產生一第二 延遲信號; 組合該第一延遲信號、該第一延遲k號及該通信信號 ,以產生一估計信號;以及 使用該估計信號指示該音頻是否存在。 9。一種用以偵測一通信信號内一音頻之音頻偵測器,其包 括: 用以提供一第一延遲信號之一第一電路; 用以提供一第二延遲信號之一第二電路; 用以組合該第一延遲信號、該第二延遲信號及該通信 信號以產生一估計信號之估計電路;以及 用以使用該估計信號指示該音頻是否存在之音頻指 示。 I 0 · —種用以減少具有複數個滤波器係數之一遽波器的^^ 散之方法,該方法包括: 當一近端化號一參數在一弟一預定限值之下且一遠 端信號一參數在一第二預定限值之下時中斷該等複數 個濾波器係數至少一部分的調適。 II · 一種用以減少具有複數個濾波器係數之一濾波器的發 散之方法,其中該濾波器具有複數個狀態,其包含一第 一狀態及一第二狀態,該方法包括: 決定該適應性濾波器之一當前狀態; 當該適應性濾波器之該當前狀態係該第一狀態時儲 存該等複數個濾波器係數;以及 86017 200417167 當該適應性濾波器之該當前狀態係該第二狀態時不 執行該等複數個濾波器係數之儲存。 12. 一種用以改進用於一通信系統内的一適應性濾、波器之 穩定性的方法,該方法包栝: 選擇性調整一錯誤信號之一增益;以及 對選擇性調整該錯誤信號之該增益作出反應,確保該 通、系統之一增益不大於1。 13. 一種用以指示一通信信號内是否存在一音頻之方法,其 包括: 藉由一預定延遲延遲該通信信號以產生一延遲信號; 產生一產生正弦信號; 組合該延遲信號、該產生正弦信號及該通信信號,以 產生一第一相關性信號及一第二相關性信號;以及 使用該第一相關性信號及該第二相關性信號指示該 音頻是否已偵測。 14. 一種用以濾波一信號之濾波器,其包括: 用以在一第一適應性速率濾波該信號之一第一適應 性濾波器;以及 核合至該第一適應性濾波器用以在第二適應性速率 濾波該信號之一第二適應性濾波器, 其中該第一適應性速率小於該第二適應性速率。 15. 一種用以執行一信號之適應性濾波的方法,其包括: 在一第一適應性速率濾波該信號以產生一第一濾波 輸出;以及 86017 -4- 200417167 弟適應丨生速率遽波該第一濾波輸出以產生一 弟一滤波輸出, 其中该第一適應性速率小於該第二適應性速率。 16. 一種用以改進一適應性濾波器之穩定性的方法,其包括: 監測該適應性濾波器内之複數個濾波器係數; 偵測該等複數個濾波器係數内一預定圖樣;以及 若偵測到該預定圖樣,將不同複數個濾波器係數載入 該適應性濾波器内。 86017200417167 Patent application park: 1. A method for performing non-linear processing of audio signals for selectively affecting background noise, including: selectively estimating the background noise to generate—estimate background noise Level; determining whether the estimated background noise level exceeds a predetermined standard; and selectively injecting the predetermined background noise into the audio signal. 2 · An echo canceller, comprising: an adaptive filter; a control circuit coupled to the adaptive filter; and a non-linear processor integrated to the control circuit to selectively estimate the moon scene noise Signal, and if one of at least one near-end signal and one far-end signal is detected to interrupt background noise estimation. 3. A method for performing near-end signal detection, including: determining the power of a 'receiving path' output; determining the power of an error signal; and using the power of the output of the receiving path control And the power of the error signal detects whether the near-end signal is present. 4. An echo canceller, comprising: a near-end 彳 & detection as' it determines a power output from one of a receiving path and a power of an error signal to detect whether a near-end signal exists; An adaptive filter coupled to the near-end signal detector; a control circuit coupled to the adaptive filter; and a non-linear processor coupled to the control circuit. 86017 5. A method for performing echo cancellation, comprising: performing adaptive filtering for the purpose of echo cancellation; estimating pure delay simultaneously with the step of performing adaptive filtering; and selectively using the pure delay to adjust A position of an adaptive filter window. 6. A method for performing echo cancellation, comprising: determining separately estimated delay values; and performing non-linear filtering of the individually estimated delay values to produce a pure delay; and selectively using the pure delay to adjust an adaptive filtering Position of the filter window; and perform adaptive filtering for this purpose of echo cancellation. 7. · An echo canceller, comprising: a first adaptive filter for cancelling an echo; and a monitoring and control unit rounded to one of the first adaptive filters, including a second adaptive filter The monitoring and control unit for estimating pure delay, wherein the pure delay is used to adjust a position of an adaptive filter window of the first adaptive filter, and wherein the second adaptive filter includes The filtering estimates the delay value separately to produce one of the pure delays, a non-linear filter. 8. A method for indicating whether an audio signal exists in a communication signal, including: delaying the communication signal by a predetermined first delay to generate a first-delay signal; 86017 -2- 200417167 by a predetermined first Two delays delay the communication signal to generate a second delay signal; combine the first delay signal, the first delay k number, and the communication signal to generate an estimated signal; and use the estimated signal to indicate whether the audio is present. 9. An audio detector for detecting an audio in a communication signal includes: a first circuit for providing a first delay signal; a second circuit for providing a second delay signal; An estimation circuit that combines the first delayed signal, the second delayed signal, and the communication signal to generate an estimated signal; and an audio indicator for using the estimated signal to indicate whether the audio is present. I 0 · A method for reducing the dispersion of a wave filter with a plurality of filter coefficients, the method includes: when a near-end number, a parameter is below a predetermined limit, and a distance When a parameter of the terminal signal is below a second predetermined limit, the adjustment of at least a part of the plurality of filter coefficients is interrupted. II · A method for reducing the divergence of a filter having a plurality of filter coefficients, wherein the filter has a plurality of states including a first state and a second state, the method includes: determining the adaptability One of the current states of the filter; storing the plurality of filter coefficients when the current state of the adaptive filter is the first state; and 86017 200417167 when the current state of the adaptive filter is the second state The storage of the plurality of filter coefficients is not performed at the time. 12. A method for improving the stability of an adaptive filter and a wave filter used in a communication system, the method comprising: selectively adjusting a gain of an error signal; and selectively adjusting the gain of the error signal The gain responds to ensure that one of the pass and the system gain is not greater than one. 13. A method for indicating whether an audio signal exists in a communication signal, comprising: delaying the communication signal by a predetermined delay to generate a delayed signal; generating a generated sinusoidal signal; combining the delayed signal and the generated sinusoidal signal And the communication signal to generate a first correlation signal and a second correlation signal; and using the first correlation signal and the second correlation signal to indicate whether the audio has been detected. 14. A filter for filtering a signal, comprising: a first adaptive filter for filtering the signal at a first adaptive rate; and a first adaptive filter for synthesizing to the first adaptive filter for the first adaptive rate. Two adaptive rate filters One of the signals is a second adaptive filter, wherein the first adaptive rate is less than the second adaptive rate. 15. A method for performing adaptive filtering of a signal, comprising: filtering the signal at a first adaptive rate to produce a first filtered output; and 86017 -4- 200417167 adaptive adaptation of the signal to the wave rate. The first filtered output generates a one-by-one filtered output, wherein the first adaptive rate is less than the second adaptive rate. 16. A method for improving the stability of an adaptive filter, comprising: monitoring a plurality of filter coefficients in the adaptive filter; detecting a predetermined pattern in the plurality of filter coefficients; and if After detecting the predetermined pattern, different adaptive filter coefficients are loaded into the adaptive filter. 86017
TW92116878A 2002-06-24 2003-06-20 Communication system and method therefor TWI319270B (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
US10/178,154 US7215765B2 (en) 2002-06-24 2002-06-24 Method and apparatus for pure delay estimation in a communication system
US10/178,427 US7242762B2 (en) 2002-06-24 2002-06-24 Monitoring and control of an adaptive filter in a communication system
US10/178,597 US7016488B2 (en) 2002-06-24 2002-06-24 Method and apparatus for non-linear processing of an audio signal
US10/178,560 US7388954B2 (en) 2002-06-24 2002-06-24 Method and apparatus for tone indication
US10/178,176 US6961423B2 (en) 2002-06-24 2002-06-24 Method and apparatus for performing adaptive filtering

Publications (2)

Publication Number Publication Date
TW200417167A true TW200417167A (en) 2004-09-01
TWI319270B TWI319270B (en) 2010-01-01

Family

ID=45073613

Family Applications (1)

Application Number Title Priority Date Filing Date
TW92116878A TWI319270B (en) 2002-06-24 2003-06-20 Communication system and method therefor

Country Status (1)

Country Link
TW (1) TWI319270B (en)

Also Published As

Publication number Publication date
TWI319270B (en) 2010-01-01

Similar Documents

Publication Publication Date Title
US7242762B2 (en) Monitoring and control of an adaptive filter in a communication system
US6961423B2 (en) Method and apparatus for performing adaptive filtering
US8098812B2 (en) Method of controlling an adaptation of a filter
JP2005531200A (en) Communication system and method therefor
EP2745500B1 (en) Clock skew compensation for acoustic echo cancellers using inaudible tones
Benesty et al. Advances in network and acoustic echo cancellation
US5668794A (en) Variable gain echo suppressor
US7215765B2 (en) Method and apparatus for pure delay estimation in a communication system
US9237226B2 (en) Controlling echo in a wideband voice conference
JPH07508866A (en) Methods of fail-safe operation in speakerphone systems
BR112015007306A2 (en) acoustic echo cancellation system, fast fourier transform, acoustic echo cancellation method, signal level and acoustic echo cancellation system through communication networks
SK282101B6 (en) Network with echo reducing
KR20000048835A (en) Echo canceller with silence detecion
KR20100097085A (en) Double talk detection method based on spectral acoustic properties
US8787561B2 (en) Techniques for implementing adaptation control of an echo canceller to facilitate detection of in-band signals
US7035397B2 (en) System and method for updating filter coefficients and echo canceller including same
WO2005043772A1 (en) Echo canceler
US7613291B1 (en) Echo path change detection using dual sparse filtering
US7016488B2 (en) Method and apparatus for non-linear processing of an audio signal
JPS61135239A (en) Echo canceller
KR101045472B1 (en) Method and apparatus for dynamically inserting gain in an adaptive filter system
TW200417167A (en) Communication system and method therefor
Chandra et al. Performance Evaluation of Adaptive Algorithms for Monophonic Acoustic Echo Cancellation: A Technical
EP1944877B1 (en) Method of modifying a residual echo
Vu Double talk detection using a psychoacoustic auditory model

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees