TW202239144A - Direct current offset protection circuit and method - Google Patents

Direct current offset protection circuit and method Download PDF

Info

Publication number
TW202239144A
TW202239144A TW110109059A TW110109059A TW202239144A TW 202239144 A TW202239144 A TW 202239144A TW 110109059 A TW110109059 A TW 110109059A TW 110109059 A TW110109059 A TW 110109059A TW 202239144 A TW202239144 A TW 202239144A
Authority
TW
Taiwan
Prior art keywords
circuit
offset
register
polarity
pwm
Prior art date
Application number
TW110109059A
Other languages
Chinese (zh)
Other versions
TWI762239B (en
Inventor
邱信源
楊翔宇
Original Assignee
晶豪科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 晶豪科技股份有限公司 filed Critical 晶豪科技股份有限公司
Priority to TW110109059A priority Critical patent/TWI762239B/en
Application granted granted Critical
Publication of TWI762239B publication Critical patent/TWI762239B/en
Publication of TW202239144A publication Critical patent/TW202239144A/en

Links

Images

Abstract

A direct current (DC) offset protection circuit includes: a DC offset detection circuit and a control circuit. The DC offset detection circuit is arranged to detect whether a DC component exists in pulse-width-modulation (PWM) signals and accordingly generate a DC offset detection result. The control circuit is arranged to control an audio system according to the DC offset detection result. The DC offset detection circuit comprises a PWM polarity judgment circuit, a cascaded integrator-comb (CIC) filter and a DC offset judgment circuit. The PWM polarity judgment circuit is arranged to judge a polarity of complementary PWM signals and accordingly generate a polarity indication value. The CIC filter is arranged to generate a filter output signal by averaging a plurality of polarity indication values. The DC offset judgment circuit is arranged to generate the DC offset detection result by comparing the filter output signal with a predetermined DC threshold.

Description

直流偏移保護電路與方法DC offset protection circuit and method

本發明關於音訊系統,尤指一種用於在音訊系統中偵測直流成分並且進行保護控制的直流偏移保護電路和方法。The present invention relates to an audio system, in particular to a DC offset protection circuit and method for detecting a DC component in an audio system and performing protection control.

在音訊系統中,對電路和元件的保護是必要的設計考量,其中之一便是輸出直流偏移保護。一般來說,直流偏移電壓被定義為,當未有電壓施加在電路的輸入端上,此時電路輸入端或輸出端的直流電壓準位。由於元件/組件的不匹配、時間導致的元件衰退、過度電性應力(electrical overstress),或者其他因素,都可能造成輸出端的直流偏移電壓。直流偏移電壓將導致大量的直流電流流經音訊系統的揚聲器,可能對揚聲器造成不可逆轉的損壞。另外,揚聲器上的大量直流電流耗逸可能有燃燒的風險。有鑑於此,直流偏移電壓可能會對音訊系統產生負面影響,因此需要適當地降低其程度。In audio systems, the protection of circuits and components is a necessary design consideration, one of which is output DC offset protection. Generally, the DC offset voltage is defined as the DC voltage level at the input terminal or output terminal of the circuit when no voltage is applied to the input terminal of the circuit. A DC offset voltage at the output may be caused by component/component mismatch, component degradation over time, electrical overstress, or other factors. DC offset voltage will cause a large amount of DC current to flow through the speakers of the audio system, which may cause irreversible damage to the speakers. Also, the large DC current draw on the speaker could be a burn risk. For this reason, DC offset voltages can have a negative impact on audio systems and need to be appropriately reduced.

基於以上理由,本發明的目的之一在於提供一種用於音訊系統的直流偏移保護電路和方法。在本發明的多個實施例中,提供了直流偏移偵測機制,以偵測脈衝寬度調變訊號中的直流成分,這些脈衝寬度調變訊號通常在D類放大器為主的音訊系統中使用。本發明的直流偏移偵測機制主要依靠級聯積分梳狀(cascaded integrator-comb, CIC)濾波器來對脈衝寬度調變訊號的取樣進行平均計算,從而偵測脈衝寬度調變訊號中的直流成分。Based on the above reasons, one object of the present invention is to provide a DC offset protection circuit and method for an audio system. In various embodiments of the present invention, a DC offset detection mechanism is provided to detect DC components in PWM signals commonly used in class-D amplifier-based audio systems . The DC offset detection mechanism of the present invention mainly relies on cascaded integrator-comb (CIC) filters to average the samples of the PWM signal to detect DC in the PWM signal. Element.

本發明之一實施例提供一種用於一音訊系統的直流偏移保護電路,該直流偏移保護電路包含:一直流偏移偵測電路以及一控制電路。該直流偏移偵測電路用於偵測複數個脈衝寬度調變訊號中是否存在直流成分,並且據此產生一直流偏移偵測結果。該控制電路用於根據該直流偏移偵測結果,控制該音訊系統的至少一部分。該直流偏移偵測電路包含:一脈衝寬度調變極性判斷電路、一級聯積分梳狀濾波器以及一直流偏移判斷電路。該脈衝寬度調變極性判斷電路用於判斷互補的脈衝寬度調變訊號對的極性,並且據此產生一極性指示值。該級聯積分梳狀濾波器用於透過平均複數個極性指示值,產生一濾波器輸出訊號。該直流偏移判斷電路用於將該濾波器輸出訊號與至少一直流偏移臨界值比較,據此產生該直流偏移偵測結果。An embodiment of the present invention provides a DC offset protection circuit for an audio system. The DC offset protection circuit includes: a DC offset detection circuit and a control circuit. The DC offset detection circuit is used to detect whether there is a DC component in a plurality of pulse width modulation signals, and accordingly generate a DC offset detection result. The control circuit is used for controlling at least a part of the audio system according to the DC offset detection result. The DC offset detecting circuit includes: a pulse width modulation polarity judging circuit, a cascaded integral comb filter and a DC offset judging circuit. The PWM polarity judging circuit is used for judging the polarity of the complementary PWM signal pair and generating a polarity indication value accordingly. The cascaded integral comb filter is used to generate a filter output signal by averaging a plurality of polarity indication values. The DC offset judging circuit is used for comparing the filter output signal with at least a DC offset critical value, and accordingly generates the DC offset detection result.

本發明之一實施例提供一種用於一音訊系統的直流偏移保護方法。該方法包含:判斷互補的脈衝寬度調變訊號對的極性,並且據此產生一極性指示值;利用一級聯積分梳狀濾波器平均複數個極性指示值,以產生一濾波器輸出訊號;將該濾波器輸出訊號與至少一直流偏移臨界值比較,以產生一直流偏移偵測結果;以及依據該直流偏移偵測結果,控制該音訊系統的至少一部分。An embodiment of the present invention provides a DC offset protection method for an audio system. The method includes: judging the polarity of the complementary pulse width modulation signal pair, and generating a polarity indication value accordingly; using a cascaded integral comb filter to average a plurality of polarity indication values to generate a filter output signal; The filter output signal is compared with at least one DC offset threshold to generate a DC offset detection result; and at least a part of the audio system is controlled according to the DC offset detection result.

在以下內文中,描述了許多具體細節以提供閱讀者對本發明實施例的透徹理解。然而,本領域的技術人士將能理解,如何在缺少一個或多個具體細節的情況下,或者利用其他方法或元件或材料等來實現本發明。在其他情況下,眾所皆知的結構、材料或操作不會被示出或詳細描述,從而避免模糊本發明的核心概念。In the following text, numerous specific details are described to provide the reader with a thorough understanding of the embodiments of the present invention. However, one skilled in the art will understand how to practice the invention without one or more of the specific details, or with other methods or elements or materials, or the like. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring core concepts of the invention.

說明書中提到的「一實施例」意味著該實施例所描述的特定特徵、結構或特性可能被包含於本發明的至少一個實施例中。因此,本說明書中各處出現的「在一實施例中」不一定意味著同一個實施例。此外,前述的特定特徵、結構或特性可以以任何合適的形式在一個或多個實施例中結合。Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in the embodiment may be included in at least one embodiment of the present invention. Therefore, appearances of "in one embodiment" in various places in this specification do not necessarily mean the same embodiment. Furthermore, the particular features, structures, or characteristics described above may be combined in any suitable form in one or more embodiments.

請參考圖1,該圖示出本發明實施例中,用於音訊系統的直流偏移保護電路。如圖所示,音訊系統10包含(但不限於):音訊訊號處理電路15、功率級20、多個揚聲器25、直流偏移保護電路30。直流偏移保護電路30包括直流偏移偵測電路100與控制電路200。直流偏移偵測電路100被設置為用於偵測音訊系統10中是否存在直流成分。控制電路200被設置為用於根據直流偏移偵測電路100的偵測結果,控制音訊系統10的至少一部分。Please refer to FIG. 1 , which shows a DC offset protection circuit for an audio system in an embodiment of the present invention. As shown in the figure, the audio system 10 includes (but not limited to): an audio signal processing circuit 15 , a power stage 20 , a plurality of speakers 25 , and a DC offset protection circuit 30 . The DC offset protection circuit 30 includes a DC offset detection circuit 100 and a control circuit 200 . The DC offset detection circuit 100 is configured to detect whether there is a DC component in the audio system 10 . The control circuit 200 is configured to control at least a part of the audio system 10 according to the detection result of the DC offset detection circuit 100 .

在一實施例中,音訊訊號處理電路15可能包含(未示出)取樣率轉換單元、均衡器、音量控制單元、動態範圍控制單元、限幅單元以及PWM脈波產生器等,從而對輸入的數位音訊訊號執行一系列的音訊訊號處理,並相應地以開關方式(亦即,透過脈衝寬度調變(pulse-width modulation, PWM)訊號)驅動揚聲器25。音頻系統10可以包含N個音訊通道。音訊訊號處理電路15輸出與N個音訊通道相對應的2N個PWM訊號,從而驅動N個揚聲器。在一般情況下,一對立體聲揚聲器25將透過四個PWM訊號PWML +,PWML-,PWMR +和PWMR-來驅動。其中,四個PWM訊號中包括兩對互補訊號,一對互補PWM訊號PWML+和PWML-用來在左聲道上驅動揚聲器25,而另一對互補PWM訊號PWMR +和PWMR-用來在在右聲道上驅動揚聲器25。功率級20進一步輸出PWM訊號。功率級20可包含由PWM訊號所控制的多個功率開關(power gate),並相應地提供PWM以驅動揚聲器25。請注意,在本文中所到的音訊系統10內的聲道、揚聲器和PWM訊號的數量並非發明範圍的實質限制。In one embodiment, the audio signal processing circuit 15 may include (not shown) a sampling rate conversion unit, an equalizer, a volume control unit, a dynamic range control unit, a limiter unit, and a PWM pulse generator, etc., so that the input The digital audio signal performs a series of audio signal processing, and accordingly drives the speaker 25 in a switching manner (ie, through a pulse-width modulation (PWM) signal). The audio system 10 may include N audio channels. The audio signal processing circuit 15 outputs 2N PWM signals corresponding to N audio channels to drive N speakers. In general, a pair of stereo speakers 25 will be driven by four PWM signals PWML+, PWML-, PWMR+ and PWMR-. Among them, the four PWM signals include two pairs of complementary signals, a pair of complementary PWM signals PWML+ and PWML- are used to drive the speaker 25 on the left channel, and another pair of complementary PWM signals PWMR+ and PWMR- are used to drive the speaker 25 on the right channel. The speaker 25 is driven on the channel. The power stage 20 further outputs a PWM signal. The power stage 20 may include a plurality of power gates controlled by PWM signals, and correspondingly provide PWM to drive the speaker 25 . Please note that the number of audio channels, speakers and PWM signals in the audio system 10 mentioned herein is not a substantial limitation on the scope of the invention.

直流偏移偵測電路100耦接至功率級20,並偵測功率級20所輸出的任何PWM訊號中是否存在直流成分。基於對直流成分的偵測,直流偏移偵測電路100將產生偵測訊號DC_DET以通知控制電路200。根據偵測訊號DC_DET,控制電路200可以控制功率級25停止提供PMW訊號到揚聲器25(一旦偵測到直流成分時)。根據本發明的多個實施例,即使只有一個聲道包含直流成分,功率級25也將停止向音訊系統10中的所有揚聲器25提供PWM訊號。而在另一個實施例中,功率級25將停止向包含直流成分的聲道相關的特定揚聲器25提供PWM訊號。另外,根據本發明的多個實施例,當偵測到直流成分時,控制電路200可以進一步關閉音訊系統10的其他部分。The DC offset detection circuit 100 is coupled to the power stage 20 and detects whether there is a DC component in any PWM signal output by the power stage 20 . Based on the detection of the DC component, the DC offset detection circuit 100 will generate a detection signal DC_DET to notify the control circuit 200 . According to the detection signal DC_DET, the control circuit 200 can control the power stage 25 to stop providing the PMW signal to the speaker 25 (once a DC component is detected). According to various embodiments of the present invention, the power stage 25 will stop providing PWM signals to all speakers 25 in the audio system 10 even if only one channel contains a DC component. In yet another embodiment, the power stage 25 will stop supplying the PWM signal to the specific speaker 25 associated with the channel containing the DC component. In addition, according to various embodiments of the present invention, when a DC component is detected, the control circuit 200 can further shut down other parts of the audio system 10 .

圖2繪示了本發明實施例中的直流偏移偵測電路100。如圖所示,直流偏移偵測電路100包含PWM極性判斷電路110,級聯積分梳狀(cascaded integrator–comb, CIC)濾波器120和直流偏移判斷電路130。PWM極性判斷電路110用於偵測功率級20所輸出的PWM訊號的極性,從而產生多個極性指示值PI,其中極性指示值PI用以指示PWM訊號中的一對互補PWM訊號PWMR+和PWMR-(或者是,PWML+和PWML-)的極性。在一個實施例中,PWM極性判斷電路110根據正PMW訊號(PWMR+)的取樣樣本與負PWM訊號(PWMR-)的取樣樣本之間的關係來產生極性指示值PI。例如,正PMW訊號PWMR+和負PWM訊號PWMR-將在參考時脈(未示出)的特定時脈邊緣處被取樣。因此,PWM極性判斷電路110根據正PMW訊號PWMR+和負PWM訊號PWMR-的即時取樣樣本來生成極性指示值PI。取決於它們之間的關係(即,正PMW訊號PWMR+的取樣樣本大於,等於或小於負PWM訊號PWMR-的取樣樣本),極性指示值PI將不同。FIG. 2 illustrates a DC offset detection circuit 100 in an embodiment of the present invention. As shown in the figure, the DC offset detection circuit 100 includes a PWM polarity determination circuit 110 , a cascaded integrator-comb (CIC) filter 120 and a DC offset determination circuit 130 . The PWM polarity determination circuit 110 is used to detect the polarity of the PWM signal output by the power stage 20, thereby generating a plurality of polarity indication values PI, wherein the polarity indication value PI is used to indicate a pair of complementary PWM signals PWMR+ and PWMR- in the PWM signal. (or yes, PWML+ and PWML-) polarity. In one embodiment, the PWM polarity determination circuit 110 generates the polarity indication value PI according to the relationship between the sampling samples of the positive PWM signal (PWMR+) and the sampling samples of the negative PWM signal (PWMR-). For example, the positive PWM signal PWMR+ and the negative PWM signal PWMR- will be sampled at specific clock edges of a reference clock (not shown). Therefore, the PWM polarity determination circuit 110 generates the polarity indication value PI according to the real-time sampling samples of the positive PWM signal PWMR+ and the negative PWM signal PWMR−. Depending on the relationship between them (ie, the sampling sample of the positive PWM signal PWMR+ is greater than, equal to or smaller than the sampling sample of the negative PWM signal PWMR−), the polarity indicator value PI will be different.

在一個實施例中,極性指示值可以用帶有正負號的浮點數的來表示。另外,互補PWM訊號PWMR +和PWMR-的取樣樣本的位元數小於極性指示值的位元數。例如,正PWM訊號PWMR+或負PWM訊號PWMR-的取樣樣本可以是2位元資料,而極性指示值PI可以是3位元資料。In one embodiment, the polarity indication value may be represented by a floating point number with a sign. In addition, the number of bits of the sampling samples of the complementary PWM signals PWMR+ and PWMR- is less than the number of bits of the polarity indication value. For example, the sampling samples of the positive PWM signal PWMR+ or the negative PWM signal PWMR- may be 2-bit data, and the polarity indication value PI may be 3-bit data.

每當對互補PWM訊號PWMR+和PWMR-進行取樣後,極性指示值PI將被輸出到CIC濾波器120。 CIC濾波器120被設置為在一段時間內平均多個極性指示值PI,以生成濾波器輸出訊號F_OUT。圖3示出了本發明實施例中,在直流偏移偵測電路100中使用CIC濾波器的架構示意圖。如圖所示,CIC濾波器120包括第一加法電路121,第一暫存器電路122、第二暫存器電路123、開關電路124、第二加法電路125和第三暫存器電路126。The polarity indicator value PI will be output to the CIC filter 120 every time the complementary PWM signals PWMR+ and PWMR− are sampled. The CIC filter 120 is configured to average a plurality of polarity indication values PI over a period of time to generate a filter output signal F_OUT. FIG. 3 shows a schematic diagram of the structure of a CIC filter used in the DC offset detection circuit 100 in an embodiment of the present invention. As shown in the figure, the CIC filter 120 includes a first adding circuit 121 , a first register circuit 122 , a second register circuit 123 , a switch circuit 124 , a second adding circuit 125 and a third register circuit 126 .

第一加總電路121耦接至PWM極性判斷電路110,並且被設置為用於將極性指示值PI與來自第一暫存器電路122的第一暫存器輸出ROl相加,從而產生第一加總結果SUM1。第一暫存器電路122耦接至第一加總電路121,並且被設置為用於儲存第一加總結果SUM1,並相應地提供第一暫存器輸出RO1。在一定時間間隔內,極性指示值PI將在第一暫存器電路122中累積。第二暫存器電路123耦接至第一暫存器電路122,並且被設置為用於儲存第一暫存器輸出RO1,並相應地提供第二暫存器輸出RO2。開關電路124耦接在第一暫存器電路122和第二暫存器電路123之間,並且被設置為用於在一預定時間期滿之後,導通第一暫存器電路122和第二暫存器電路123之間的訊號路徑。例如,在第一加總電路121已經將極性指示值PI加到第一暫存器輸出RO1達2 22次之後,開關電路124將導通該訊號路徑。第二加總電路125耦接至開關電路124和第二暫存器電路123,並且被設置用於為當開關電路124導通訊號路徑時,將第一暫存器輸出RO1減去第二暫存器輸出RO2,以提供第二加總結果SUM2。第三暫存器電路126耦接至第二加總電路125和直流偏移判斷電路130,並且被設置為用於儲存第二加總結果SUM2,並相應地提供第三暫存器輸出,以作為濾波器輸出訊號F_OUT。簡而言之,CIC濾波器120被設置為用於在一段時間內對極性指示值PI執行移動平均計算,而濾波器輸出訊號F_OUT正是這個計算的結果。 The first summing circuit 121 is coupled to the PWM polarity judging circuit 110, and is configured to add the polarity indication value PI to the first register output RO1 from the first register circuit 122, thereby generating a first Sum the result SUM1. The first register circuit 122 is coupled to the first summing circuit 121 and is configured to store the first summing result SUM1 and provide the first register output RO1 accordingly. The polarity indicator value PI will be accumulated in the first register circuit 122 within a certain time interval. The second register circuit 123 is coupled to the first register circuit 122 and configured to store the first register output RO1 and provide the second register output RO2 accordingly. The switch circuit 124 is coupled between the first register circuit 122 and the second register circuit 123, and is configured to turn on the first register circuit 122 and the second register circuit after a predetermined time expires. The signal path between the memory circuit 123. For example, after the first summing circuit 121 has added the polarity indication value PI to the first register output RO1 for 222 times, the switch circuit 124 will turn on the signal path. The second summing circuit 125 is coupled to the switch circuit 124 and the second register circuit 123, and is configured to subtract the second register output RO1 from the first register output RO1 when the switch circuit 124 turns on the signal path. output RO2 to provide the second summing result SUM2. The third temporary register circuit 126 is coupled to the second summation circuit 125 and the DC offset judgment circuit 130, and is configured to store the second summation result SUM2, and provide a third temporary register output accordingly, so as to As a filter output signal F_OUT. In short, the CIC filter 120 is configured to perform a moving average calculation on the polarity indicator value PI over a period of time, and the filter output signal F_OUT is the result of this calculation.

直流偏移判斷電路130被設置為用於將濾波器輸出訊號F_OUT與正直流偏移臨界值PTH和負直流偏移臨界值NTH中的至少一個進行比較,以產生直流偏移偵測結果DC_DET。其中,直流偏移偵測結果DC_DET指出在功率級20輸出的PWM訊號中是否存在正直流成分或負直流成分。參照圖4A和圖4B,該些圖示展示了偵測結果DC_DET、濾波器輸出訊號F_OUT與正直流偏移臨界值PTH和負直流偏移臨界值NTH的波形。如圖所示,當濾波器輸出訊號F_OUT超過正直流偏移臨界值PTH時,或濾波器輸出訊號F_OUT超過負直流偏移臨界值NTH時,直流偏移偵測結果DC_DET將被拉起。在一個實施例中,可以通過揚聲器25的額定功率來決定正直流偏移臨界值PTH和負直流偏移臨界值NTH。The DC offset determination circuit 130 is configured to compare the filter output signal F_OUT with at least one of a positive DC offset threshold PTH and a negative DC offset threshold NTH to generate a DC offset detection result DC_DET. Wherein, the DC offset detection result DC_DET indicates whether there is a positive DC component or a negative DC component in the PWM signal output by the power stage 20 . Referring to FIG. 4A and FIG. 4B , these figures show the waveforms of the detection result DC_DET, the filter output signal F_OUT, the positive DC offset threshold PTH and the negative DC offset threshold NTH. As shown in the figure, when the filter output signal F_OUT exceeds the positive DC offset threshold PTH, or the filter output signal F_OUT exceeds the negative DC offset threshold NTH, the DC offset detection result DC_DET will be pulled up. In one embodiment, the positive DC offset threshold PTH and the negative DC offset threshold NTH can be determined by the rated power of the speaker 25 .

圖5繪示了本發明實施例的直流偏移保護方法的流程圖,該流程包括以下步驟:FIG. 5 shows a flow chart of a DC offset protection method according to an embodiment of the present invention, and the process includes the following steps:

步驟410:判斷脈衝寬度調變訊號的極性,並且據此產生一極性指示值;Step 410: Determine the polarity of the PWM signal, and generate a polarity indication value accordingly;

步驟420:利用一CIC濾波器平均複數個極性指示值,產生一濾波器輸出訊號;Step 420: Using a CIC filter to average the plurality of polarity indication values to generate a filter output signal;

步驟430:將該濾波器輸出訊號與至少一直流偏移臨界值比較,產生一直流偏移偵測訊號;以及Step 430: Comparing the filter output signal with at least a DC offset threshold to generate a DC offset detection signal; and

步驟440:依據該直流偏移偵測訊號,控制一音訊系統的至少一部分。Step 440: Control at least a part of an audio system according to the DC offset detection signal.

由於以上內文中已經詳細解說了直流偏移保護電路30的原理和具體操作,為了簡潔起見,此處省略了關於步驟410~440的原理和具體操作的進一步說明。值得注意的是,本發明的直流偏移保護方法除了步驟410~440以外,還可以具有更多的額外步驟,以實現直流偏移偵測與保護。Since the principle and specific operation of the DC offset protection circuit 30 have been explained in detail above, for the sake of brevity, further descriptions on the principle and specific operation of steps 410-440 are omitted here. It should be noted that, in addition to steps 410-440, the DC offset protection method of the present invention may have more additional steps to realize DC offset detection and protection.

總結來說,本發明提供了一種直流偏移保護電路和方法。本發明的直流偏移偵測機制可用於偵測,以D類放大器為核心架構的音訊系統所使用的PWM訊號中的直流成分。並且,透過CIC濾波器對PWM訊號的取樣樣本執行平均計算,從而偵測PWM訊號中的直流成分,以防止潛在的直流電流損壞揚聲器或音訊系統內的元件。In summary, the present invention provides a DC offset protection circuit and method. The DC offset detection mechanism of the present invention can be used to detect the DC component in the PWM signal used by the audio system with the class D amplifier as the core structure. Moreover, the average calculation is performed on the sampling samples of the PWM signal through the CIC filter, so as to detect the DC component in the PWM signal, so as to prevent the potential DC current from damaging the speaker or the components in the audio system.

本發明之實施例可使用裝置、方法或計算機程式產品來實現。因此,本發明實施例可以採取下列形式:完全硬體架構,完全軟體架構(包括韌體,常駐軟體,微程式碼等),或者是同時結合了軟體和硬體的架構,這些架構可在本說明書以“模組”或“系統”的文字來描述。進一步來說,本發明之實施例除了可藉由適當的指令執行系統,使用儲存於一記憶體中之軟體或韌體來實作本發明的實施例外,也可應用下列任一技術或其相關結合來完成:具有可根據資料訊號執行邏輯功能之邏輯閘的一個別運算邏輯、具有合適的組合邏輯閘之一特定應用積體電路(application specific integrated circuit, ASIC)、可程式閘陣列(programmable gate array, PGA)或一現場可程式閘陣列(field programmable gate array, FPGA)等。Embodiments of the invention can be implemented using devices, methods or computer program products. Therefore, the embodiment of the present invention can take the following forms: a complete hardware architecture, a complete software architecture (including firmware, resident software, microcode, etc.), or an architecture that combines software and hardware at the same time. These architectures can be found in this The manual is described in terms of "module" or "system". Furthermore, the embodiments of the present invention can use software or firmware stored in a memory to implement the embodiments of the present invention through an appropriate instruction execution system, and any of the following technologies or related technologies can also be applied Combined to complete: an individual arithmetic logic with logic gates that can perform logic functions according to data signals, an application specific integrated circuit (ASIC) with suitable combinational logic gates, a programmable gate array (programmable gate) array, PGA) or a field programmable gate array (field programmable gate array, FPGA), etc.

說明書內的流程圖中的流程和方塊示出了基於本發明的各種實施例的系統、方法和電腦軟體產品所能實現的架構,功能和操作。在這方面,流程圖或功能方塊圖中的每個方塊可以代表程式碼的模組,區段或者是部分,其包括用於實現指定的邏輯功能的一個或多個可執行指令。另外,功能方塊圖以及/或流程圖中的每個方塊,以及方塊的組合,基本上可以由執行指定功能或動作的專用硬體系統來實現,或專用硬體和電腦程式指令的組合來實現。這些電腦程式指令還可以存儲在電腦可讀媒體中,該媒體可以使電腦或其他可編程數據處理裝置以特定方式工作,使得存儲在電腦可讀媒體中的指令,實現流程圖以及/或功能方塊圖中的方塊所指定的功能/動作。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 The processes and blocks in the flowcharts in the specification show the architecture, functions and operations that can be realized by the systems, methods and computer software products based on various embodiments of the present invention. In this regard, each block in the flowchart or functional block diagram may represent a module, section, or portion of program code, which includes one or more executable instructions for implementing the specified logical function. In addition, each block in the functional block diagram and/or flowchart, as well as the combination of blocks, can basically be realized by a dedicated hardware system for performing specified functions or actions, or a combination of dedicated hardware and computer program instructions. . These computer program instructions can also be stored in a computer-readable medium, which can make a computer or other programmable data processing device work in a specific way, so that the instructions stored in the computer-readable medium can realize the flow chart and/or the functional block The function/action specified by the block in the figure. The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.

10:音訊系統 15:音訊訊號處理電路 20:功率級 30:直流偏移保護電路 100:直流偏移偵測電路 110:PWM極性判斷電路 120:CIC濾波器 122、123、126:暫存器電路 130:直流偏移判斷電路 200:控制電路 10: Audio system 15: Audio signal processing circuit 20: power level 30: DC offset protection circuit 100: DC offset detection circuit 110: PWM polarity judgment circuit 120: CIC filter 122, 123, 126: register circuit 130: DC offset judgment circuit 200: control circuit

圖1繪示本發明實施例之用於音訊系統中的直流偏移保護電路的架構示意圖。 圖2繪示本發明實施例之直流偏移保護電路中的直流偏移偵測電路的架構示意圖。 圖3繪示本發明實施例之用於直流偏移偵測電路中的級聯積分梳狀濾波器的架構示意圖。 圖4A和圖4B繪示直流偏移偵測結果、濾波器輸出訊號、正直流偏移臨界值和負直流偏移臨界值的組合的波形圖。 圖5繪示本發明實施例之直流偏移保護方法的流程圖。 FIG. 1 is a schematic diagram of a structure of a DC offset protection circuit used in an audio system according to an embodiment of the present invention. FIG. 2 is a schematic structural diagram of a DC offset detection circuit in a DC offset protection circuit according to an embodiment of the present invention. FIG. 3 is a schematic diagram of the architecture of cascaded integrating comb filters used in the DC offset detection circuit according to an embodiment of the present invention. 4A and 4B are waveform diagrams illustrating combinations of DC offset detection results, filter output signals, positive DC offset thresholds, and negative DC offset thresholds. FIG. 5 is a flowchart of a DC offset protection method according to an embodiment of the present invention.

100:直流偏移偵測電路 100: DC offset detection circuit

110:PWM極性判斷電路 110: PWM polarity judgment circuit

120:級聯積分梳狀濾波器濾波器 120: cascaded integral comb filter filter

130:直流偏移判斷電路 130: DC offset judgment circuit

Claims (10)

一種用於一音訊系統的直流偏移保護電路,包含: 一直流偏移偵測電路,用於偵測複數個脈衝寬度調變(pulse-width modulation, PWM)訊號中的直流成分,包含: 一PWM極性判斷電路,用於判斷互補的PWM訊號對的極性,並且據此產生一極性指示值; 一級聯積分梳狀(cascaded integrator–comb, CIC)濾波器,耦接至該PWM極性判斷電路,用於透過平均複數個極性指示值,以產生一濾波器輸出訊號;以及 一直流偏移判斷電路,耦接至該CIC濾波器,用於將該濾波器輸出訊號與至少一直流偏移臨界值比較,據此產生一直流偏移偵測結果;以及 一控制電路,耦接於該直流偏移判斷電路,用於根據該直流偏移偵測結果,控制該音訊系統的至少一部分。 A DC offset protection circuit for an audio system, comprising: A DC offset detection circuit for detecting DC components in a plurality of pulse-width modulation (PWM) signals, including: A PWM polarity judging circuit, used to judge the polarity of the complementary PWM signal pair, and generate a polarity indication value accordingly; a cascaded integrator-comb (CIC) filter, coupled to the PWM polarity judging circuit, for generating a filter output signal by averaging a plurality of polarity indication values; and a DC offset judging circuit, coupled to the CIC filter, for comparing the output signal of the filter with at least a DC offset threshold, thereby generating a DC offset detection result; and A control circuit, coupled to the DC offset judging circuit, is used for controlling at least a part of the audio system according to the DC offset detection result. 如請求項1所述的直流偏移保護電路,其中該PWM極性判斷電路根據該互補PWM訊號對中之一正PWM訊號的一取樣樣本以及一負PWM訊號的一取樣樣本之間的關係,產生該極性指示值。The DC offset protection circuit as described in Claim 1, wherein the PWM polarity judgment circuit generates a The polarity indicates the value. 如請求項1所述的直流偏移保護電路,其中該互補PWM訊號對之取樣樣本的位元數低於該極性指示值的位元數,以及該極性指示值為帶有正負號的浮點數。The DC offset protection circuit as claimed in claim 1, wherein the number of bits of the sampling sample of the complementary PWM signal pair is lower than the number of bits of the polarity indication value, and the polarity indication value is a floating point with a sign number. 如請求項1所述的直流偏移保護電路,其中該CIC濾波器包含: 一第一加總電路,耦接至該PWM極性判斷電路,用於將該極性指示值與一第一暫存器輸出相加,產生一第一加總結果; 一第一暫存器電路,耦接至該第一加總電路,用於儲存該第一加總結果,並且據此提供該第一暫存器輸出; 一第二暫存器電路,耦接至該第一暫存器電路,用於儲存該第一暫存器輸出,並且據此提供一第二暫存器輸出; 一開關電路,耦接於該第一暫存器電路與該第二暫存器電路之間,用於在一預定時間期滿之後,導通該第一暫存器電路與該第二暫存器電路之間一訊號路徑; 一第二加總電路,耦接至該關開電路與該第二暫存器電路,用於當該開關電路導通該訊號路徑時,從該第一暫存器輸出減去該第二暫存器輸出,以提供一第二加總結果;以及 一第三暫存器電路,耦接至該第二加總電路和該直流偏移判斷電路,用於儲存該第二加總結果,據此提供一第三暫存器輸出作為該濾波器輸出訊號。 The DC offset protection circuit as claimed in item 1, wherein the CIC filter includes: a first summing circuit, coupled to the PWM polarity judging circuit, for adding the polarity indication value and a first register output to generate a first summing result; a first register circuit, coupled to the first summing circuit, for storing the first summing result and providing the first register output accordingly; a second register circuit coupled to the first register circuit for storing the first register output and providing a second register output accordingly; a switch circuit, coupled between the first register circuit and the second register circuit, for turning on the first register circuit and the second register circuit after a predetermined time expires a signal path between circuits; a second summing circuit, coupled to the switch circuit and the second register circuit, for subtracting the second register from the output of the first register when the switch circuit turns on the signal path device output to provide a second summation result; and A third register circuit, coupled to the second summing circuit and the DC offset judgment circuit, for storing the second summing result, thereby providing a third register output as the filter output signal. 如請求項1所述的直流偏移保護電路,其中該直流偏移判斷電路用於將該濾波器輸出訊號與一正直流偏移臨界值以及一負直流偏移臨界值中的至少一者進行比較,以產生該直流偏移偵測結果,其中該直流偏移偵測結果指出該PWM訊號中是否存在一正直流成分或者是一負直流成分。The DC offset protection circuit as described in claim 1, wherein the DC offset judgment circuit is used to compare the output signal of the filter with at least one of a positive DC offset threshold and a negative DC offset threshold comparing to generate the DC offset detection result, wherein the DC offset detection result indicates whether there is a positive DC component or a negative DC component in the PWM signal. 一種用於一音訊系統的直流偏移保護方法,包含 判斷互補的脈衝寬度調變(pulse-width modulation, PWM)訊號對的極性,並且據此產生一極性指示值; 利用一級聯積分梳狀(cascaded integrator–comb, CIC)濾波器平均複數個極性指示值,以產生一濾波器輸出訊號; 將該濾波器輸出訊號與至少一直流偏移臨界值比較,以產生一直流偏移偵測結果;以及 依據該直流偏移偵測結果,控制該音訊系統的至少一部分。 A DC offset protection method for an audio system, comprising judging the polarity of a complementary pulse-width modulation (PWM) signal pair, and generating a polarity indication value accordingly; using a cascaded integrator-comb (CIC) filter to average a plurality of polarity indication values to generate a filter output signal; comparing the filter output signal with at least one DC offset threshold to generate a DC offset detection result; and Controlling at least a part of the audio system according to the DC offset detection result. 如請求項6所述的直流偏移保護方法,其中產生該極性指示值的步驟包含: 根據該互補PWM訊號對中之一正PWM訊號的一取樣樣本以及一負PWM訊號的一取樣樣本之間的關係,產生該極性指示值。 The DC offset protection method as described in claim item 6, wherein the step of generating the polarity indication value includes: The polarity indication value is generated according to a relationship between a sampling sample of a positive PWM signal and a sampling sample of a negative PWM signal in the pair of complementary PWM signals. 如請求項6所述的直流偏移保護方法,其中該互補PWM訊號對之取樣樣本的位元數低於該極性指示值的位元數,以及該極性指示值為帶有正負號的浮點數。The DC offset protection method as claimed in claim 6, wherein the number of bits of the sampling sample of the complementary PWM signal pair is lower than the number of bits of the polarity indication value, and the polarity indication value is a floating point with a sign number. 如請求項6所述的直流偏移保護方法,其中利用該CIC濾波器平均該複數個極性指示值以產生該濾波器輸出訊號的步驟包含: 利用一第一加總電路將該極性指示值與一第一暫存器輸出相加,產生一第一加總結果; 利用一第一暫存器電路儲存該第一加總結果,並且據此提供該第一暫存器輸出; 利用一第二加總電路,在一預定時間期滿之後從該第一暫存器輸出減去一第二暫存器輸出,以提供一第二加總結果;以及 利用一第二暫存器電路,在一預定時間期滿之後儲存該第一暫存器輸出,並且據此提供該第二暫存器輸出;以及 利用一第三暫存器電路儲存該第二加總結果,並且據此提供一第三暫存器輸出作為該濾波器輸出訊號。 The DC offset protection method as described in claim 6, wherein the step of using the CIC filter to average the plurality of polarity indication values to generate the filter output signal includes: adding the polarity indication value and a first temporary register output by using a first summing circuit to generate a first summing result; storing the first summation result with a first register circuit, and providing the first register output accordingly; subtracting a second register output from the first register output after expiration of a predetermined time using a second summing circuit to provide a second summing result; and using a second register circuit to store the first register output after expiration of a predetermined time and provide the second register output accordingly; and A third register circuit is used to store the second summation result, and accordingly a third register output is provided as the filter output signal. 如請求項6所述的直流偏移保護方法,其中將該濾波器輸出訊號與該至少一直流偏移臨界值比較,以產生該直流偏移偵測結果的步驟包含: 於將該濾波器輸出訊號與一正直流偏移臨界值以及一負直流偏移臨界值中的至少一者進行比較,以產生該直流偏移偵測結果,其中該直流偏移偵測結果指出該PWM訊號中是否存在一正直流成分或者是一負直流成分。 The DC offset protection method as described in claim 6, wherein the step of comparing the filter output signal with the at least one DC offset threshold to generate the DC offset detection result includes: comparing the filter output signal with at least one of a positive DC offset threshold and a negative DC offset threshold to generate the DC offset detection result, wherein the DC offset detection result indicates Whether there is a positive DC component or a negative DC component in the PWM signal.
TW110109059A 2021-03-15 2021-03-15 Direct current offset protection circuit and method TWI762239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110109059A TWI762239B (en) 2021-03-15 2021-03-15 Direct current offset protection circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110109059A TWI762239B (en) 2021-03-15 2021-03-15 Direct current offset protection circuit and method

Publications (2)

Publication Number Publication Date
TWI762239B TWI762239B (en) 2022-04-21
TW202239144A true TW202239144A (en) 2022-10-01

Family

ID=82199029

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110109059A TWI762239B (en) 2021-03-15 2021-03-15 Direct current offset protection circuit and method

Country Status (1)

Country Link
TW (1) TWI762239B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7078964B2 (en) * 2003-10-15 2006-07-18 Texas Instruments Incorporated Detection of DC output levels from a class D amplifier
US6998911B2 (en) * 2003-12-18 2006-02-14 International Rectifier Corporation Gate control circuit with soft start/stop function
US7576604B2 (en) * 2006-12-15 2009-08-18 Bin Xu All-digital class-D audio amplifier
CN103701465B (en) * 2013-12-02 2016-09-21 苏州上声电子有限公司 A kind of digital loudspeaker system implementation method based on many bits △ Σ modulation and device
EP3567722A1 (en) * 2018-05-09 2019-11-13 ams AG Class-d amplifier and method for generating a driver signal

Also Published As

Publication number Publication date
TWI762239B (en) 2022-04-21

Similar Documents

Publication Publication Date Title
US7425864B2 (en) Recovery from clipping events in a class D amplifier
JP5157959B2 (en) Class D amplifier
US6107875A (en) Variable frequency class D modulator with built in soft clipping and frequency limiting
US20130089223A1 (en) Output Power Limiter in an Audio Amplifier
CN101127509A (en) Timer reset circuit for overcurrent protection of switching power amplifier
JP4513832B2 (en) Class D amplifier circuit
EP2127070A2 (en) A data processing system for clipping correction
TWI573399B (en) Quaternary/ternary modulation selecting circuit
US8872561B2 (en) Systems and methods for edge control based on detecting current direction in a switched output stage
US7659789B2 (en) Signal modulation scheme in class-D amplification and circuit therefor
JP4853176B2 (en) Class D amplifier
EP3054595A1 (en) Pulse width modulation
TW202239144A (en) Direct current offset protection circuit and method
JP2007124624A (en) Class-d amplifier
US11368130B1 (en) Direct current offset protection circuit and method
CN115243157A (en) DC offset protection circuit and method
JP5980133B2 (en) Zero cross detector
US11750163B2 (en) Deglitching circuit and method in a class-D amplifier
TWI584579B (en) Modulation selecting circuit of audio amplifier and method thereof
CN107306117B (en) Quaternary/ternary modulation selection circuit
KR20020034677A (en) High-Efficiency Switching Amplifier
US8983095B2 (en) Driver circuit
JP2009089289A (en) Class-d amplifier
JP4466695B2 (en) Class D amplifier circuit
JP5157960B2 (en) Class D amplifier