The present invention relates generally to an electronic system and method, and, in particular embodiments, to a deglitching circuit and method in a class-D amplifier.
A class-D amplifier is a switching amplifier that operates the output transistors as electronic switches instead of in the linear region.
During normal operation, comparator 102 receives audio input signal 116 and triangular waveform 118 (e.g., a sawtooth waveform) and generates pulse-width modulation (PWM) signal 120. PWM signal 120 is used to control drive circuit 104, which in turn drives transistors 106 and 108 of output stage 105 based on PWM signal 120. Output stage 105 produces output signal 122, which drives speaker 114 through low pass filter (LPF) 109.
PWM signal 120 has a frequency that is typically higher than 20 kHz, causing the switching frequency of output signal 122 to also be above 20 kHz, which is above the human's audible range. LPF 109 generally filters out the switching noise generated by output signal 122.
During normal operation, the square-wave output of output stage 105 is summed with audio input signal 116 to provide negative feedback. Integrator circuit 202 provides the resulting signal into comparator 102, which operates in a similar manner as in class-D amplifier 100.
In accordance with an embodiment, a class-D amplifier includes an input terminal configured to receive an input signal; a comparator having an input coupled to the input terminal; a deglitching circuit having an input coupled to an output of the comparator; and a driving circuit having an input coupled to an output of the deglitching circuit. The deglitching circuit includes a logic circuit coupled between the input of the deglitching circuit and the output of the deglitching circuit. The logic circuit is configured to receive a clock signal having the same frequency as the switching frequency of the class-D amplifier.
In accordance with an embodiment, a class-D amplifier includes: a fully-differential pre-amplifier circuit having first and second input terminals configured to receive an input signal and first and second output terminals configured to generate an amplified signal based on the input signal; a first integrator having an input terminal coupled to the first output terminal of the fully-differential pre-amplifier circuit; a second integrator having an input terminal coupled to the second output terminal of the fully-differential pre-amplifier circuit; a first comparator having an input terminal coupled to an output terminal of the first integrator; a second comparator having an input terminal coupled to an output terminal of the first integrator; first and second deglitching circuits having input terminals coupled to output terminals of the first and second comparators, respectively; and first and second driving circuits having input terminals coupled to output terminals of the first and second deglitching circuits, respectively. Each of the first and second deglitching circuits include: a first deglitching input terminal configured to receive a first signal, a deglitching output terminal, and a logic circuit coupled between the first deglitching input terminal and the deglitching output terminal.
In accordance with an embodiment, a method of deglitching in an audio class-D amplifier includes: receiving an input signal with the audio class-D amplifier; generating a first signal based on the input signal; comparing the first signal with a reference signal to generate a pulse-width modulation (PWM) signal; deglitching the PWM signal to produce a deglitched PWM signal; and driving an output stage of the audio class-D amplifier with the deglitched PWM signal. Deglitching the PWM signal includes: receiving a clock signal, set the deglitched PWM signal to a first state when the PWM has the first state and the clock signal is has the first state, set the deglitched PWM signal to a second state when the PWM has the second state and the clock signal is has the second state, and keep a same state of the deglitched PWM signal when the PWM signal has the first state and the clock signal has the second state, or when the PWM signal has the second state and the clock signal has the first state.
For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
Corresponding numerals and symbols in different figures generally refer to corresponding parts unless otherwise indicated. The figures are drawn to clearly illustrate the relevant aspects of the preferred embodiments and are not necessarily drawn to scale.
The making and using of the embodiments disclosed are discussed in detail below. It should be appreciated, however, that the present invention provides many applicable inventive concepts that can be embodied in a wide variety of specific contexts. The specific embodiments discussed are merely illustrative of specific ways to make and use the invention, and do not limit the scope of the invention.
The description below illustrates the various specific details to provide an in-depth understanding of several example embodiments according to the description. The embodiments may be obtained without one or more of the specific details, or with other methods, components, materials and the like. In other cases, known structures, materials or operations are not shown or described in detail so as not to obscure the different aspects of the embodiments. References to “an embodiment” in this description indicate that a particular configuration, structure or feature described in relation to the embodiment is included in at least one embodiment. Consequently, phrases such as “in one embodiment” that may appear at different points of the present description do not necessarily refer exactly to the same embodiment. Furthermore, specific formations, structures or features may be combined in any appropriate manner in one or more embodiments.
The present invention will be described with respect to embodiments in a specific context, an audio class-D amplifier having a deglitching filter. Embodiments of the present invention may be used in other circuits, such as non-audio class-D amplifiers, and other PWM modulation class-D architectures, for example.
In an embodiment of the present invention, a class-D amplifier includes a deglitching circuit configured to remove glitches, e.g., caused by spikes in the power supply rail or ground references, without using an additional high frequency clock and without using a low-pass filter at the output of the comparator. By avoiding the use of an additional high-frequency clock, some embodiments advantageously achieve lower power consumption with a less complex circuit. By avoiding the use of a low-pass filter, some embodiments advantageously avoid any distortion that the low-pass filter may add.
Conventional class-D amplifiers, such as conventional class-D amplifiers 100 and 200, may exhibit occasional glitches at the output of comparator 102. Such glitches may be caused, for example, by spikes in the power supply rail or ground reference of the comparator. The glitches at the output of the comparator may generation audible distortion and an increase in power dissipation, which, in some scenarios, may cause damage to the amplifier. Conventional ways to remove such glitches includes using an additional high frequency clock to sample the PWM signal at the output of comparator 102, and using a low-pass filter coupled to the output of comparator 102 to filter out such glitches.
In an embodiment of the present invention, a deglitching circuit is coupled between the output of the comparator and the drive circuit and is implemented with digital logic.
During normal operation, fully-differential pre-amplifier 308 receives audio input Vin and generates a corresponding differential amplified input signal. Integrators 322 and 372 receive the respective amplified input signals and integrate them to generate respective signals V318 and V368. PWM signals VOUTP and VOUTM at respective outputs of half-bridges 332 and 382 are respectively fed back to integrators 322 and 372 to cause audio-class-D amplifier 300 to operate in closed-loop mode, which generally improves performance, such as improving total harmonic distortion (THD) and power supply rejection ratio (PSRR), for example.
Comparators 324 and 374 respectively receive signals V318 and V368 from integrators 322 and 372 and compare them with triangular signal Vtri to generate PWM signals V324 and V374, respectively. Triangular signal Vtri operates at the same frequency as clock signal CLK (as shown in
PWM signals V324 and V374 are respectively deglitched by deglitching circuits 328 and 378 to generate deglitched PWM signals V328 and V378, respectively. Deglitched PWM signals V328 and V378 respectively drive drive circuits 330 and 380, which in turn drive half-bridges 332 and 382. Half-bridges 332 and 382 drive audio speaker 304 via output filter 305.
In some embodiments, input stage 303, which includes fully-differential pre-amplifier 308, comparators 318 and 368 and integrators 322 and 372 operate with power supply voltage VDD while output stage 331 operates with power supply voltage VCC. In some embodiments, voltage references Vcmfb and Vref are constant (i.e., DC voltages) and are generated to be used as the DC level shift between input stage 303 and output stage 331. In some embodiments, power supply voltage VDD is at a voltage of 3.3 V while power supply voltage VCC is at voltage between 5 V to 36 V. Other voltages may be used.
Drive circuits 330 and 380 are used to drive half-bridges 332 and 382, respectively. For example, drive circuits 330 and 380 may be used to drive the control terminals corresponding high-side transistors 334 and 384, and low-side transistors 336 and 386. Drive circuits 330 and 380 may be implemented in any way known in the art.
Output stage 331 may be implemented in any way known in the art. For example, in some embodiments, transistors 334 and 384 are power metal-oxide-semiconductor field-effect transistors (MOSFETs) of the p-type, and transistors 336 and 386 are power MOSFETs of the n-type arranged in a bridge tied-load (BTL) structure.
Inverters 402 and 412 are coupled to reference voltages Vsqp and Vsqn, as shown in
where T is the period of clock signal CLK, C is the capacitance of capacitors 320 and 370, respectively, and Rsq is the resistance of resistors 408 and 418, respectively.
Deglitching circuits 428 and 478 respectively receive PWM signals V324 and V374 and clock signal CLK.
As shown in
Deglitching circuit 502 may be implemented with digital logic. For example,
During normal operation, each time PWM signals VOUTP and VOUTM at outputs OUTP and OUTM transition (i.e., rise/fall edge), there is a chance that a glitch, such as glitch 702 or 704 is produced at the output of comparators 324 and 374 (i.e., at signal Sin), e.g., as a result of power supply rail or ground reference spikes. Glitch 702 may occur, e.g., during time Δt2 after PWM signals VOUTP and VOUTM transition. Time Δt2 may be, for example, between 10 ns and 100 ns. Shorter or longer times may also be possible.
When glitch 702 occurs at input signal Sin during time Δt2 after PWM signals VOUTP and VOUTM transition, glitch 702 is not propagated to output signal Sout because the glitch causes input signal Sin to transition from low to high and back to low at a time when clock signal CLK is low, which based on truth table 500 causes output signal Sout to remain low. When glitch 704 occurs at input signal Sin during time Δt2 after PWM signals VOUTP and VOUTM transition, glitch 704 is not propagated to output signal Sout because the glitch causes input signal Sin to transition from high to low and back to high at a time when clock signal CLK is high, which based on truth table 500 causes output signal Sout to remain high.
As shown in
The duration of glitch 702 and/or 704 may be, for example, time Δt5. Time Δt5 may be, for example, between 10 ns and 100 ns. Shorter or longer times are also possible.
As also shown in
td=tinv+tint+tcomp (1)
where tinv corresponds to the propagation time of inverter 402 or 412, tint corresponds to the propagation time of integrator 322 or 372, and tcomp corresponds to the propagation time of comparator 324 or 374. In some embodiments, tinv may be about 1 ns, tint may be about tens of ns, and tcomp may be about tens of ns, such as 50 ns or lower. Other propagation times are also possible.
As shown in
As shown in
Delay circuit 1202 produces delayed clock signal CLKd. The delay introduced by delay circuit 1202 compensates for the delay td of input signal Sin. Delay circuit 1202 may be implemented in any way known in the art. For example, in some embodiments, delay circuit 1202 may be implemented by one or more buffers or inverters connected in series. Other implementations, such as using flip-flops or other digital or analog implementations are also possible.
By compensating delay td, deglitching circuit 1200 advantageously allows for removing glitches caused, e.g., by spikes in the power supply rail or ground references, without distorting the audio signal by missing small pulses. For example,
As shown in
tclk_d=tinv+tint+tcomp (2)
where tinv corresponds to the propagation time of inverter 402 or 412, tint corresponds to the propagation time of integrator 322 or 372, and tcomp corresponds to the propagation time of comparator 324 or 374. In some embodiments, clock delay tclk_d may be slightly bigger than delay td, such as 1% to 10% bigger. Other clock delay tclk_d times are also possible. For example, in some embodiments, the clock delay tclk_d time is determined by estimating tinv, tint, and tcomp over different processing corners, different temperatures, etc., (e.g., using Monte-Carlo simulations), and selecting a clock delay tclk_d time such that tclk_d≥tinv+tint+tcomp for the different scenarios.
In some embodiments, the clock delay tclk_d, after applying Equation 2, may be smaller than 100 ns. Bigger or smaller clock delays are also possible. For example, in embodiments in which the frequency of clock CLK is 400 kHz, the clock delay tclk_d may be as high as 150 ns or higher. For example, in some embodiments, the the clock delay tclk_d may be as high as 10% of the period of the clock CLK, or higher. The frequency of clock CLK may be, for example, between 100 kHz and 4 MHz. Higher or lower frequencies are also possible.
By removing glitches while avoiding missing small pulses, distortion and THD performance may advantageously be improved. For example,
As shown in
As shown in
Advantages of some embodiments include that glitches at the output of the comparator may be removed by using a simple deglitching circuit that does not introduce additional distortion. In some embodiments, the deglitching circuit may be implemented with digital logic only.
Example embodiments of the present invention are summarized here. Other embodiments can also be understood from the entirety of the specification and the claims filed herein.
Example 1. A class-D amplifier including: an input terminal configured to receive an input signal; a comparator having an input coupled to the input terminal; a deglitching circuit having an input coupled to an output of the comparator; and a driving circuit having an input coupled to an output of the deglitching circuit, where the deglitching circuit includes a logic circuit coupled between the input of the deglitching circuit and the output of the deglitching circuit, the logic circuit configured to receive a clock signal having a same frequency as the switching frequency of the class-D amplifier.
Example 2. The class-D amplifier of example 1, where the logic circuit includes a latch.
Example 3. The class-D amplifier of one of examples 1 or 2, where the deglitching circuit includes only digital logic circuitry.
Example 4. The class-D amplifier of one of examples 1 to 3, where the deglitching circuit does not introduce a phase delay based on a frequency of the input signal.
Example 5. The class-D amplifier of one of examples 1 to 4, where the logic circuit includes a second input configured to receive the clock signal, and where the deglitching circuit is configured to produce at the output of the deglitching circuit: a 0 when the input is 0 and the second input is 0; a 1 when the input is 1 and the second input is 1; and keep a previous state of the output of the deglitching circuit when the input is 0 and the second input is 1 or when the input is 1 and the second input is 0.
Example 6. The class-D amplifier of one of examples 1 to 5, where the logic circuit further includes: a NAND gate having a first input coupled to the input of the logic circuit and a second input coupled to the second input of the logic circuit; a NOR gate having a first input coupled to the input of the logic circuit and a second input coupled to the second input of the logic circuit; an inverter having an input coupled to an output of the NAND gate; and a latch having a first input coupled to an output of the inverter and a second input coupled to an output of the NOR gate.
Example 7. The class-D amplifier of one of examples 1 to 6, where the deglitching circuit includes a delay circuit having an output coupled to the second input of the logic circuit.
Example 8. The class-D amplifier of one of examples 1 to 7, where the delay circuit is configured to cause a delay of the clock signal that is smaller than 50 ns.
Example 9. The class-D amplifier of one of examples 1 to 8, further including an output stage coupled to the driving circuit, the driving circuit configured to drive the output stage.
Example 10. The class-D amplifier of one of examples 1 to 9, further including an audio speaker coupled to the output stage.
Example 11. A class-D amplifier including: a fully-differential pre-amplifier circuit having first and second input terminals configured to receive an input signal and first and second output terminals configured to generate an amplified signal based on the input signal; a first integrator having an input terminal coupled to the first output terminal of the fully-differential pre-amplifier circuit; a second integrator having an input terminal coupled to the second output terminal of the fully-differential pre-amplifier circuit; a first comparator having an input terminal coupled to an output terminal of the first integrator; a second comparator having an input terminal coupled to an output terminal of the first integrator; first and second deglitching circuits having input terminals coupled to output terminals of the first and second comparators, respectively; and first and second driving circuits having input terminals coupled to output terminals of the first and second deglitching circuits, respectively, where each of the first and second deglitching circuits include: a first deglitching input terminal configured to receive a first signal, a deglitching output terminal, and a logic circuit coupled between the first deglitching input terminal and the deglitching output terminal.
Example 12. The class-D amplifier of example 11, where the logic circuit includes a latch.
Example 13. The class-D amplifier of one of examples 11 or 12, where each of the first and second deglitching circuits include only digital logic circuitry.
Example 14. The class-D amplifier of one of examples 11 to 13, where none of the first and second deglitching circuit introduce a phase delay based on a frequency of the input signal.
Example 15. The class-D amplifier of one of examples 11 to 14, where the logic circuit includes a clock input terminal configured to receive a clock signal, and where each deglitching circuit is configured to produce at the deglitching output terminal, respectively: a first state when the first signal has the first state and the clock signal has the first state; a second state when the first signal has the second state and the clock signal has the second state; and keep a previous state of the deglitching output terminal when the first signal has the first state and the clock signal has the second state or when the first signal has the second state and the clock signal has the first state.
Example 16. The class-D amplifier of one of examples 11 to 15, where the logic circuit further includes: a NAND gate having a first input terminal coupled to the first deglitching input terminal and a second input terminal coupled to the clock input terminal; a NOR gate having a first input terminal coupled to the first deglitching input terminal and a second input terminal coupled to the clock input terminal; an inverter having an input terminal coupled to an output terminal of the NAND gate; and a latch having a first input terminal coupled to an output terminal of the inverter and a second input terminal coupled to an output terminal of the NOR gate.
Example 17. The class-D amplifier of one of examples 11 to 16, further including: a first inverter having an input terminal configured to receive the clock signal and an output terminal coupled the input terminal of the first integrator; and a second inverter having an input terminal configured to receive the clock signal and an output terminal coupled the input terminal of the second integrator.
Example 18. The class-D amplifier of one of examples 11 to 17, where each of the first and second deglitching circuits include a delay circuit having an input terminal coupled to the clock input terminal, the delay circuit configured to receive the clock signal and generate a delayed clock signal.
Example 19. The class-D amplifier of one of examples 11 to 18, further including an output stage and an audio speaker coupled to output stage, the first and second driving circuits coupled to the output stage to drive the output stage.
Example 20. A method of deglitching in an audio class-D amplifier, the method including: receiving an input signal with the audio class-D amplifier; generating a first signal based on the input signal; comparing the first signal with a reference signal to generate a pulse-width modulation (PWM) signal; deglitching the PWM signal to produce a deglitched PWM signal; and driving an output stage of the audio class-D amplifier with the deglitched PWM signal, where deglitching the PWM signal includes: receiving a clock signal, set the deglitched PWM signal to a first state when the PWM has the first state and the clock signal is has the first state, set the deglitched PWM signal to a second state when the PWM has the second state and the clock signal is has the second state, and keep a same state of the deglitched PWM signal when the PWM signal has the first state and the clock signal has the second state, or when the PWM signal has the second state and the clock signal has the first state.
Example 21. The method of example 20, where generating the first signal includes amplifying the input signal with a fully-differential pre-amplifier circuit.
Example 22. The method of one of examples 20 or 21, where the reference signal is a constant voltage.
While this invention has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications and combinations of the illustrative embodiments, as well as other embodiments of the invention, will be apparent to persons skilled in the art upon reference to the description. It is therefore intended that the appended claims encompass any such modifications or embodiments.
This application is a continuation of U.S. patent application Ser. No. 16/354,760, filed Mar. 15, 2019, which application is hereby incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
7315202 | Tsuji | Jan 2008 | B2 |
7795970 | Kaya | Sep 2010 | B2 |
7965141 | Dooper | Jun 2011 | B2 |
8212612 | Song et al. | Jul 2012 | B2 |
8729965 | Chen | May 2014 | B2 |
9231535 | Du et al. | Jan 2016 | B2 |
9306523 | Du et al. | Apr 2016 | B2 |
9923528 | Marcone | Mar 2018 | B2 |
20060008095 | Tsuji | Jan 2006 | A1 |
20150022265 | Marcone | Jan 2015 | A1 |
20170194922 | Yuan | Jul 2017 | A1 |
20200280287 | Gallo | Sep 2020 | A1 |
Entry |
---|
Texas Instruments, “TPA2010D1 2.5-W Mono Filter-Free Class-D Audio Power Amplifier”, TPA2010D1, SLOS417D, Oct. 2003, 35 pages. |
Texas Instruments, “9-W Stereo Class-D Audio Power Amplifier with DC Volume Control”, TPA3002D2, SLOS402C, Dec. 2002, 41 pages. |
Texas Instruments, “3-W Stereo Class-D Audio Power Amplifier with DC Volume Control”, TPA3003D2, SLOS406A, Feb. 2003, 37 pages. |
Texas Instruments, “6-W Stereo Class-D Audio Power Amplifier”, TPA3005D2, SLOS427A, May 2004, 32 pages. |
Texas Instruments, “10-W Stereo Class-D Audio Power Amplifier”, TPA3008D2, SLOS435C, May 2004, 33 pages. |
Number | Date | Country | |
---|---|---|---|
20210203293 A1 | Jul 2021 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 16354760 | Mar 2019 | US |
Child | 17200490 | US |