Amplitude detection method and signal processing controller

By detecting the time interval of the voltage signal edge event at the output end of the audio power amplifier circuit, the amplitude detection process is simplified, the complex and high-cost problems in the existing technology are solved, and efficient and low-cost output signal amplitude detection is achieved.

CN120750329APending Publication Date: 2025-10-03WUHAN JUXIN MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510861773.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing amplitude detection methods are complex and have high hardware costs in audio power amplifier circuits, and it is difficult to achieve accurate and efficient output signal amplitude detection with existing technologies.

Method used

By detecting the time interval between voltage signal edge events at the output end of the audio power amplifier circuit and combining it with a preset duration, the amplitude of the output signal is determined, simplifying the amplitude detection process, reducing dependence on low-pass filtering and complex comparison circuits, and lowering hardware costs.

Benefits of technology

The amplitude detection process is simplified, hardware costs are reduced, and the system's robustness and common-mode noise resistance are improved, ensuring stable detection of the output signal amplitude under different electrical environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120750329A_ABST
    Figure CN120750329A_ABST
Patent Text Reader

Abstract

The invention discloses an amplitude detection method and a signal processing controller, which are used for detecting the amplitude of an output signal of an audio power amplification circuit, and the amplitude detection method comprises the following steps: obtaining a first voltage signal output by a first output end of the audio power amplification circuit and a second voltage signal output by a second output end of the audio power amplification circuit; detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring a time interval between the first edge event and the second edge event; wherein the first edge event and the second edge event are voltage jump events with the same polarity in the first voltage signal and the second voltage signal in the same clock period; and determining the amplitude of the output signal of the audio power amplification circuit based on the comparison result of the time interval and the preset duration. According to the invention, the amplitude detection process is simplified, the hardware cost is reduced, and the robustness of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal detection, and in particular to an amplitude detection method and a signal processing controller. Background Art

[0002] In audio power amplifier applications, accurate detection of the output signal amplitude is a key technology for achieving dynamic gain control, overload protection, and energy efficiency optimization. However, existing amplitude detection methods are relatively complex and require high hardware costs. Summary of the Invention

[0003] The present invention provides an amplitude detection method and a signal processing controller, which simplify the amplitude detection process, reduce hardware costs, and improve the robustness of the system.

[0004] In a first aspect, an embodiment of the present invention provides an amplitude detection method for detecting the amplitude of an output signal of an audio power amplifier circuit. The amplitude detection method includes: obtaining a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of the audio power amplifier circuit; detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring the time interval between the first edge event and the second edge event; wherein the first edge event and the second edge event are adjacent voltage jump events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle; and determining the amplitude of the output signal of the audio power amplifier circuit based on a comparison result of the time interval and a preset duration.

[0005] Optionally, the first edge event is the rising edge of the first voltage signal, and the second edge event is the rising edge of the second voltage signal; the steps of detecting the first edge event of the first voltage signal and the second edge event of the second voltage signal, and measuring the time interval between the first edge event and the second edge event include: when the rising edge of the first voltage signal is detected, the counter starts timing, and when the rising edge of the second voltage signal is detected, the counter ends timing and records the time interval.

[0006] Optionally, the first edge event is the falling edge of the first voltage signal, and the second edge event is the falling edge of the second voltage signal; the steps of detecting the first edge event of the first voltage signal and the second edge event of the second voltage signal, and measuring the time interval between the first edge event and the second edge event include: when the falling edge of the first voltage signal is detected, the counter starts timing, and when the falling edge of the second voltage signal is detected, the counter ends timing and records the time interval.

[0007] Optionally, the first edge event is the rising edge of the first voltage signal, and the second edge event is the rising edge of the second voltage signal; the steps of detecting the first edge event of the first voltage signal and the second edge event of the second voltage signal, and measuring the time interval between the first edge event and the second edge event include: when the rising edge of the second voltage signal is detected, the counter starts timing, and when the rising edge of the first voltage signal is detected, the counter ends timing and records the time interval.

[0008] Optionally, the first edge event is the falling edge of the first voltage signal, and the second edge event is the falling edge of the second voltage signal; the steps of detecting the first edge event of the first voltage signal and the second edge event of the second voltage signal, and measuring the time interval between the first edge event and the second edge event include: when the falling edge of the second voltage signal is detected, the counter starts timing, and when the falling edge of the first voltage signal is detected, the counter ends timing and records the time interval.

[0009] Optionally, after the step of determining the amplitude of the output signal of the audio power amplifier circuit based on the comparison result of the time interval and the preset duration, the amplitude detection method further includes: reducing the gain of the audio power amplifier circuit when the time interval is less than the preset duration.

[0010] Optionally, after the step of determining the amplitude of the output signal of the audio power amplifier circuit based on the comparison result of the time interval and the preset duration, the amplitude detection method further includes: when the time interval is greater than the preset duration, increasing the gain of the audio power amplifier circuit to a normal value.

[0011] Optionally, the preset duration is positively correlated with a preset amplitude of the output signal.

[0012] Optionally, when the carrier signal used in the audio power amplifying circuit is a triangle wave signal,

[0013] Preset duration

[0014] Alternatively, when the carrier signal used in the audio power amplifier circuit is a sawtooth wave signal,

[0015] Preset duration;

[0016] Among them, V signal_out It represents the preset amplitude of the output signal, T is the period of the clock signal, and PVDD represents the supply voltage of the H-bridge in the audio power amplifier circuit.

[0017] Optionally, the audio power amplification circuit includes a PWM amplifier with differential output.

[0018] In a second aspect, an embodiment of the present invention provides a signal processing controller, comprising: a signal acquisition module, used to acquire a first voltage signal output from a first output end of an audio power amplifier circuit and a second voltage signal output from a second output end; a time measurement module, used to detect a first edge event of the first voltage signal and a second edge event of the second voltage signal, and to measure the time interval between the first edge event and the second edge event; wherein the first edge event and the second edge event are voltage jump events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle; an amplitude determination module, used to determine the amplitude of the output signal of the audio power amplifier circuit based on a comparison result of the time interval and a preset duration.

[0019] Optionally, the signal processing controller further includes a gain adjustment module, which is configured to reduce the gain of the audio power amplification circuit when the time interval is less than a preset duration.

[0020] Optionally, the gain adjustment module is further configured to increase the gain of the audio power amplifier circuit to a normal value when the time interval is greater than a preset duration.

[0021] The amplitude detection method provided by an embodiment of the present invention obtains a first square wave signal output from the first output terminal of the power amplifier circuit and a second square wave signal output from the second output terminal; detects a first edge event of the first square wave signal and a second edge event of the second square wave signal, and measures the time interval between the first edge event and the second edge event; determines the amplitude of the output signal of the power amplifier circuit based on a comparison result of the time interval with a preset duration, innovatively converting the amplitude detection into a measurement of the time interval between the edge events of two voltage signals, avoiding complex signal processing procedures and simplifying the amplitude detection process. Since the amplitude is no longer dependent on low-pass filtering and complex comparison circuits, the number of components required in the circuit is reduced. For example, there is no need to use an all-pass filter or digital delay unit specifically for phase compensation, as well as a low-pass filter, high-gain amplifier, and ultra-low offset comparator for processing the output signal, thereby reducing hardware costs.

[0022] Furthermore, this time-difference-based detection method is insensitive to common-mode noise and voltage fluctuations. Common-mode noise typically affects both the first and second voltage signals. However, when detecting the time interval between rising edges, the effects of common-mode noise are canceled out. Voltage fluctuations also prevent the relative measurement of the time interval between the two rising edges. This allows the system to stably detect the output signal amplitude in a variety of electrical environments, improving system robustness.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 is a flow chart of an amplitude detection method provided by an embodiment of the present invention;

[0026] Figure 2 1 is a schematic diagram of the circuit structure of an audio power amplifier circuit provided by an embodiment of the present invention;

[0027] Figure 3 is a structural diagram of an audio system provided by an embodiment of the present invention;

[0028] Figures 4 to 9 This is a waveform diagram of a relevant key node provided by an embodiment of the present invention;

[0029] Figure 10 is a flow chart of another amplitude detection method provided by an embodiment of the present invention;

[0030] Figure 11 is a flow chart of another amplitude detection method provided by an embodiment of the present invention;

[0031] Figure 12 is a flow chart of another amplitude detection method provided by an embodiment of the present invention;

[0032] Figure 13 is a flow chart of another amplitude detection method provided by an embodiment of the present invention;

[0033] Figure 14 is a flow chart of another amplitude detection method provided by an embodiment of the present invention;

[0034] Figure 15 It is a structural diagram of a signal processing controller provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] Existing output signal amplitude detection methods mainly rely on two schemes: input end signal detection method and output end signal detection method, that is, an amplitude detection method based on an input signal and an amplitude detection method based on an output signal.

[0038] The input-signal-based amplitude detection method collects the input signal of the audio power amplifier circuit and indirectly infers the output signal amplitude based on the input-output gain relationship. Although this method circumvents the challenges of directly processing high-voltage output signals, it has the following technical limitations: First, due to the inherent transmission delay of the amplifier and the phase offset introduced by the feedback network, there is a non-ideal phase difference between the input and output signals, which significantly reduces the accuracy of amplitude judgment. Second, to eliminate the systematic error caused by phase mismatch, additional phase compensation circuits (such as all-pass filters or digital delay units) must be integrated, which not only increases hardware complexity but also significantly increases system cost. Finally, for low-amplitude signal scenarios, high-precision comparators with ultra-low offset voltage and high-speed response are required. The selection and integration of such devices significantly increases design complexity and implementation cost.

[0039] The output-side signal amplitude detection method directly captures the signal at the output of the audio power amplifier circuit. However, it requires a low-pass filter to restore the analog audio signal. This signal is then processed through a "dual-ended to single-ended" amplifier circuit and input into a comparator for amplitude determination. While this solution can directly reflect the output state, it introduces new problems: First, the low-pass filter causes signal delay and distortion, making it particularly susceptible to noise interference near the switching frequency. Second, the multi-stage series design of filtering, amplification, and comparators significantly increases circuit complexity and power consumption. Finally, the signal amplitude is attenuated after filtering, requiring a higher-gain amplifier and ultra-low-offset comparator, further increasing detection costs.

[0040] In order to solve the above-mentioned problems in the prior art, an embodiment of the present invention provides an amplitude detection method and a signal processing controller. The following first introduces an audio power amplifier circuit to which the amplitude detection method provided by the embodiment of the present invention is applied.

[0041] Optionally, the audio power amplifier circuit includes a PWM amplifier with a differential output. Exemplarily, the audio power amplifier circuit may be a Class D power amplifier for analog input signals or digital input signals.

[0042] Figure 2 FIG. 1 is a circuit diagram of an audio power amplifier circuit provided by an embodiment of the present invention. Figure 2 As shown, the audio power amplifier circuit includes a buffer module 10, an amplifier module 20 electrically connected to the buffer module 10, a comparison module 30 electrically connected to the amplifier module 20, and an output module 40 electrically connected to the comparison module 30. The amplifier module 20 is configured to amplify the input signal, the comparison module 30 is configured to output a specific signal that meets preset conditions and transmit it to the output module 40, and the output module 40 is configured to output the specific signal along a specific path.

[0043] It should be noted that the specific signal output by the comparison module 30 is a pulse width modulation (PWM) signal, specifically a differential square wave signal generated by triangular wave or sawtooth wave modulation. That is, the differential square wave signal is generated by the first comparator COMP1 and the second comparator COMP2 by comparing the input audio signal with the triangular wave or sawtooth wave.

[0044] Specifically, the audio power amplifier circuit also includes two input terminals and two output terminals, wherein the two input terminals are respectively a first input terminal INP and a second input terminal INN, and the two output terminals are respectively a first output terminal VOP and a second output terminal VON. The input terminal of the buffer module 10 is electrically connected to the first input terminal INP and the second input terminal INN, respectively, and the output terminal of the output module 40 is electrically connected to the first output terminal VOP and the second output terminal VON, respectively. The input terminal of the amplifier module 20 is electrically connected to the output terminal of the buffer module 10, the input terminal of the comparison module 30 is electrically connected to the output terminal of the amplifier module 20, and the input terminal of the output module 40 is electrically connected to the output terminal of the comparison module 30.

[0045] The buffer module 10 includes a first operational amplifier OP1, two second resistors R2, and two feedback resistors Rfb. The second resistors R2 are used to adjust the voltage division of the second operational amplifier OP2. The audio power amplifier circuit also includes a first resistor R1, which is used to adjust the voltage division of the first operational amplifier OP1.

[0046] The amplifier module 20 includes a second operational amplifier OP2, a third operational amplifier OP3, and two third resistors R3. The third resistors R3 are used to adjust the voltage division of the third operational amplifier OP3, two first capacitors C1, two fourth resistors R4, and two second capacitors C2. Furthermore, the audio power amplifier circuit includes two fifth resistors R5, two sixth resistors R6, and two seventh resistors R7.

[0047] The comparison module 30 includes a first comparator COMP1, a second comparator COMP2, and a triangular wave generator OSC. The first comparator COMP1 and the second comparator COMP2 are both electrically connected to the output terminal of the amplification module 20. The triangular wave generator OSC is electrically connected to the first comparator COMP1 and the second comparator COMP2. The triangular wave generator OSC is used to provide a triangular wave signal.

[0048] In one embodiment, the triangle wave generator OSC may be another generator that generates a linear waveform. For example, it may be a sawtooth wave generator. This embodiment is described using the triangle wave generator as an example.

[0049] Specifically, the non-inverting input terminal of the first comparator COMP1 is electrically connected to the inverting output terminal of the third operational amplifier OP3, the inverting input terminal of the second comparator COMP2 is electrically connected to the non-inverting output terminal of the third operational amplifier OP3, the inverting input terminal of the first comparator COMP1 is electrically connected to the non-inverting input terminal of the second comparator COMP2, and the output terminal of the first comparator COMP1 and the output terminal of the second comparator COMP2 are both electrically connected to the input terminal of the output module 40. The first comparator COMP1 and the second comparator COMP2 are both pulse-width modulation (PWM) comparators.

[0050] The output module 40 includes a bridge switching circuit (also called an H-bridge) electrically connected to the output end of the first comparator COMP1 and the output end of the second comparator COMP2. The bridge switching circuit can convert the voltage outputted by its output end between forward and reverse directions.

[0051] Specifically, the bridge switching circuit includes a first inverter and a second inverter, wherein the first inverter includes a first transistor M1 and a second transistor M2, and the second inverter includes a third transistor M3 and a fourth transistor M4. The gates of the first transistor M1 and the second transistor M2 are both connected to the output terminal of the first comparator COMP1, the first electrode of the first transistor M1 is connected to the power supply voltage PVDD, the second electrode of the first transistor M1 is connected to the second electrode of the second transistor M2, and the first electrode of the second transistor M1 is grounded. The gates of the third transistor M3 and the fourth transistor M4 are both connected to the output terminal of the second comparator COMP2, the first electrode of the third transistor M3 is connected to the power supply voltage PVDD, the second electrode of the third transistor M3 is connected to the second electrode of the fourth transistor M4, and the first electrode of the fourth transistor M4 is grounded.

[0052] The output end of the output module 40 is electrically connected to the first output end VOP and the second output end VON of the audio power amplifier circuit, and is used to provide voltage signals through the first output end VOP and the second output end VON; wherein, the output module 40 is used to provide a first voltage signal V1 through the first output end VOP, and to provide a second voltage signal V2 through the second output end VON.

[0053] Furthermore, an audio generator 11 may be connected between the first output terminal VOP and the second output terminal VON. Under the action of the voltage signal output by the output module 40 through the first output terminal VOP and the second output terminal VON, the audio generator 11 is driven to generate sound.

[0054] In some embodiments, the audio generator 11 can be a transducer device such as a speaker. Its function is to convert an electrical signal into an acoustic signal driven by the output signal of the audio power amplifier circuit. Specifically, the audio generator 11 is connected between the first output terminal VOP and the second output terminal VON of the audio power amplifier circuit and receives the amplified differential voltage signal. The energy of the electrical signal is converted into mechanical vibrations through the internal electromagnetic structure (e.g., voice coil, diaphragm), thereby generating audible sound.

[0055] Based on the above audio power amplifier circuit, Figure 1 This is a flow chart of an amplitude detection method provided by an embodiment of the present invention. This amplitude detection method is used to detect the amplitude of a signal output by an audio power amplifier circuit. This amplitude detection method can be executed by a signal processing controller, which can be implemented using software and / or hardware.

[0056] like Figure 1 As shown, the amplitude detection method provided by this embodiment includes the following steps:

[0057] S101: Acquire a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of an audio power amplifier circuit.

[0058] Specifically, a first voltage signal V1 is provided through the first output terminal VOP, and a second voltage signal V2 is provided through the second output terminal VON.

[0059] Figure 3 1 is a structural diagram of an audio system provided by an embodiment of the present invention. The audio system comprises the above-mentioned audio power amplifier circuit 13 and a signal processing controller 12 , wherein the signal processing controller 12 is connected between the first output terminal VOP and the second output terminal VON of the audio power amplifier circuit 13 .

[0060] In some embodiments, the signal processing controller 12 can directly sample the voltages of the first output terminal VOP and the second output terminal VON through an internally integrated analog-to-digital converter (ADC), thereby obtaining a first voltage signal V1 output by the first output terminal VOP and a second voltage signal V2 output by the second output terminal VON.

[0061] S102. Detect a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measure the time interval between the first edge event and the second edge event; wherein the first edge event and the second edge event are voltage jump events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle.

[0062] refer to Figure 2 or Figure 3 As shown, the inverting output terminal of the third operational amplifier OP3 outputs the first signal Von', and the non-inverting output terminal of the third operational amplifier OP3 outputs the second signal Vop'. Figures 4 to 9 This is a waveform diagram of a relevant key node provided by an embodiment of the present invention, combined with Figure 2 or Figure 3 as well as Figure 4-Figure 9As shown, when the inverting inputs of the first comparator COMP1 and the second comparator COMP2 are connected to the triangular wave generator OSC, the triangular wave generator OSC outputs a triangular wave signal Vtran; when the inverting inputs of the first comparator COMP1 and the second comparator COMP2 are connected to the sawtooth wave generator, the sawtooth wave generator outputs a sawtooth wave signal Saw. The first comparator COMP1 and the second comparator COMP2 compare the first signal Von' and the second signal Vop' with the triangular wave signal Vtran or the sawtooth wave signal Saw to generate a first specific signal V1' and a second specific signal V2'. The first specific signal V1' and the second specific signal V2' are output through the inverter of the output module 40 as the first voltage signal V1 and the second voltage signal V2.

[0063] The edge events of the first voltage signal V1 and the second voltage signal V2 refer to the transient process in which the amplitude of the voltage signal jumps from a low level (falling edge) to a high level (rising edge) or from a high level to a low level.

[0064] It should be noted that, in this embodiment, the first edge event and the second edge event are voltage transition events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle. The same polarity means that the two edge events have the same transition direction. Furthermore, measuring the time interval refers to detecting the occurrence of the first edge event and the second edge event by the signal processing controller 12 and calculating the time difference between the two.

[0065] In one embodiment, within the same clock cycle, the first edge event is the rising edge of the first voltage signal V1, and the second edge event is the rising edge of the second voltage signal V2, and the time interval t1 is the time difference between the rising edge of the first voltage signal V1 and the rising edge of the second voltage signal V2. In another embodiment, within the same clock cycle, the first edge event is the falling edge of the first voltage signal V1, and the second edge event is the falling edge of the second voltage signal V2, and the time interval is t2, and the time interval t2 is the time difference between the falling edge of the first voltage signal V1 and the falling edge of the second voltage signal V2.

[0066] In some embodiments, the signal processing controller 12 implements time measurement through an internal counter. When the clock signal CLK is at a rising edge, the counter is reset; when a first edge event (such as a rising edge) of the first voltage signal V1 is detected, the counter starts counting; when a second edge event (such as a rising edge) of the second voltage signal V2 is detected, the counter ends counting, and the timing time interval is t1.

[0067] It can be understood that by combining the count value recorded by the counter with the clock frequency, the time interval t1 = count value / clock frequency can be calculated.

[0068] S103 : Determine the amplitude of the output signal of the audio power amplifying circuit based on a comparison result of the time interval and the preset duration.

[0069] Specifically, the duty cycle D of the output signal of the audio power amplifier circuit is: D = (t1 + t2) / T. T is the clock period of the clock signal, t1 is the time interval between the rising edge of the first voltage signal V1 and the rising edge of the second voltage signal V2, and t2 is the time interval between the falling edge of the first voltage signal V1 and the falling edge of the second voltage signal V2.

[0070] In some embodiments, when the carrier signal used by the audio power amplification circuit is a triangular wave signal, t1 = t2 , and D = 2t1 / T.

[0071] The voltage amplitude Vout of the output signal of the audio power amplifier circuit is the product of the power supply voltage PVDD and the duty cycle D, that is, Vout=PVDD×D.

[0072] That is, Vout=PVDD×(2t1 / T), and t1=(Vout×T) / (2×PVDD).

[0073] Furthermore, the preset duration t is dynamically adjusted based on the preset amplitude of the output signal. That is, when the carrier signal used in the audio power amplifier circuit is a linear waveform signal, such as a triangle wave or sawtooth wave, the preset duration is positively correlated with the preset amplitude of the output signal. As the preset amplitude increases, the preset duration increases accordingly; as the preset amplitude decreases, the preset duration decreases accordingly. By dynamically adjusting the preset duration, the audio system can adapt to the detection requirements of different output amplitudes, avoiding false triggering of overload protection or insufficient sensitivity caused by fixed thresholds.

[0074] When the carrier signal used in the audio power amplifier circuit is a triangular wave signal:

[0075]

[0076] When the carrier signal used in the audio power amplifier circuit is a sawtooth wave signal:

[0077]

[0078] Among them, V signal_out It represents the preset amplitude of the output signal, T is the period of the clock signal, and PVDD represents the supply voltage of the H-bridge in the power amplifier circuit.

[0079] When t1>t, it indicates that the voltage amplitude Vout of the output signal is greater than the preset amplitude Vsignal_out of the output signal, that is, at this time, the audio power amplifier circuit has music output. The embodiment of the present invention increases the gain to make the amplitude of the output signal larger, thereby improving the effect of the output signal; when t1<t, it indicates that the voltage amplitude Vout of the output signal is less than the preset amplitude Vsignal_out of the output signal, that is, at this time, the audio power amplifier circuit basically has no music output. The embodiment of the present invention reduces the gain to make the amplitude of the output signal smaller, thereby reducing the noise of the output signal, avoiding hearing a buzzing sound when there is no music output or the music output volume is low.

[0080] An amplitude detection method provided by an embodiment of the present invention obtains a first square wave signal output from a first output terminal of a power amplifier circuit and a second square wave signal output from a second output terminal; detects a first edge event of the first square wave signal and a second edge event of the second square wave signal, and measures the time interval between the first edge event and the second edge event; and determines the amplitude of the output signal of the power amplifier circuit based on a comparison result of the time interval and a preset duration.

[0081] This invention innovatively transforms amplitude detection into the measurement of the time interval between two voltage signal edge events, avoiding complex signal processing and simplifying the amplitude detection process. By eliminating the reliance on low-pass filtering and complex comparison circuits for amplitude detection, the number of required circuit components is reduced. For example, there is no need for an all-pass filter or digital delay unit specifically for phase compensation, nor for a low-pass filter, high-gain amplifier, and ultra-low-offset comparator for output signal processing, thereby reducing hardware costs.

[0082] Furthermore, when the amplitude of the output signal is small, the gain can be reduced, thereby reducing noise; and when the amplitude of the output signal is large, the gain can be increased, thereby improving the effect of the output signal.

[0083] Furthermore, this time-difference-based detection method is insensitive to common-mode noise and voltage fluctuations. Common-mode noise typically affects both the first and second voltage signals. However, when detecting the time interval between rising edges, the effects of common-mode noise are canceled out. Voltage fluctuations also prevent the relative measurement of the time interval between the two rising edges. This allows the system to stably detect the output signal amplitude in a variety of electrical environments, improving system robustness.

[0084] Figure 10 This is a flow chart of another amplitude detection method provided by an embodiment of the present invention. Figure 10 As shown, the amplitude detection method includes the following steps:

[0085] S201: Acquire a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of an audio power amplifier circuit.

[0086] S202 : When a rising edge of the first voltage signal is detected, the counter starts timing; when a rising edge of the second voltage signal is detected, the counter stops timing and records the time interval.

[0087] Continue to refer Figure 4 or Figure 5 In one embodiment, when the rising edge of the first voltage signal V1 occurs earlier than the rising edge of the second voltage signal V2, the signal processing controller 12 starts the internal counter to start timing once it detects that the first voltage signal V1 jumps from a low level to a high level (i.e., a rising edge occurs); and when it is subsequently detected that the second voltage signal V2 also jumps from a low level to a high level with a rising edge, the counter stops timing and records the duration of this timing. This recorded duration is the time interval t1 between the rising edge of the first voltage signal V1 and the rising edge of the second voltage signal V2.

[0088] It can be understood that if Von'>Vtran or Saw, the first specific signal V1' is positive, and the first voltage signal V1 is negative; if Von'<Vtran or Saw, the first specific signal V1' is negative, and the first voltage signal V1 is positive. Similarly, if Vop'>Vtran or Saw, the second specific signal V2' is positive, and the second voltage signal V2 is negative; if Vop'<Vtran or Saw, the second specific signal V2' is positive, and the second voltage signal V2 is negative.

[0089] S203 : Determine the amplitude of the output signal of the audio power amplifying circuit based on a comparison result of the time interval and the preset duration.

[0090] Figure 11 This is a flow chart of another amplitude detection method provided by an embodiment of the present invention. Figure 11 As shown, the amplitude detection method includes the following steps:

[0091] S301: Acquire a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of an audio power amplifier circuit.

[0092] S302 : When a falling edge of the first voltage signal is detected, the counter starts timing; when a falling edge of the second voltage signal is detected, the counter stops timing and records the time interval.

[0093] Continue to refer Figure 6 or Figure 7In another embodiment, when the falling edge of the first voltage signal V1 occurs earlier than the falling edge of the second voltage signal V2, the signal processing controller 12 starts the internal counter to start timing once it detects that the first voltage signal V1 jumps from a high level to a low level (i.e., the falling edge occurs); and when it is subsequently detected that the second voltage signal V2 also jumps from a high level to a low level with a falling edge, the counter stops timing and records the duration of this timing. This recorded duration is the time interval t1 or t2 between the falling edge of the first voltage signal V1 and the falling edge of the second voltage signal V2.

[0094] S303 : Determine the amplitude of the output signal of the audio power amplifying circuit based on a comparison result of the time interval and the preset duration.

[0095] Figure 12 This is a flow chart of another amplitude detection method provided by an embodiment of the present invention. Figure 12 As shown, the amplitude detection method includes:

[0096] S401: Acquire a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of an audio power amplifier circuit.

[0097] S402 : When a rising edge of the second voltage signal is detected, the counter starts timing; when a rising edge of the first voltage signal is detected, the counter stops timing and records the time interval.

[0098] Continue to refer Figure 7 or Figure 8 In another embodiment, when the rising edge of the second voltage signal V2 occurs earlier than the rising edge of the first voltage signal V1, the signal processing controller starts timing the internal counter once it detects that the second voltage signal V2 jumps from a low level to a high level (i.e., a rising edge occurs); and when the first voltage signal V1 is subsequently detected to also have a rising edge that jumps from a low level to a high level, the counter stops timing and records the duration of this timing, which is the time interval t1 or t2 between the rising edge of the first voltage signal V1 and the rising edge of the second voltage signal V2.

[0099] S403 : Determine the amplitude of the output signal of the audio power amplifying circuit based on a comparison result of the time interval and the preset duration.

[0100] Figure 13 This is a flow chart of another amplitude detection method provided by an embodiment of the present invention. Figure 13 As shown, the amplitude detection method includes:

[0101] S501: Acquire a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of an audio power amplifier circuit.

[0102] S502 : When a falling edge of the second voltage signal is detected, the counter starts timing; when a falling edge of the first voltage signal is detected, the counter stops timing and records the time interval.

[0103] Continue to refer Figure 4 or Figure 9 In another embodiment, when the falling edge of the second voltage signal V2 occurs earlier than the falling edge of the first voltage signal V1, the signal processing controller starts timing the internal counter once it detects that the second voltage signal V2 jumps from a high level to a low level (i.e., the falling edge occurs); and when the first voltage signal V1 is subsequently detected to also have a falling edge that jumps from a high level to a low level, the counter stops timing and records the duration of this timing, which is the time interval t1 or t2 between the falling edge of the first voltage signal V1 and the falling edge of the second voltage signal V2.

[0104] S503 : Determine the amplitude of the output signal of the audio power amplifying circuit based on a comparison result of the time interval and the preset duration.

[0105] Figure 14 This is a flow chart of another amplitude detection method provided by an embodiment of the present invention. Figure 14 As shown, the amplitude detection method includes:

[0106] S601: Acquire a first voltage signal output from a first output terminal and a second voltage signal output from a second output terminal of an audio power amplifier circuit.

[0107] S602 : Detect a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measure a time interval between the first edge event and the second edge event.

[0108] S603 : Determine the amplitude of the output signal of the audio power amplifying circuit based on a comparison result of the time interval and the preset duration.

[0109] S604: When the time interval is less than the preset duration, reduce the gain of the audio power amplifier circuit.

[0110] Specifically, the time interval is related to the amplitude of the output signal of the audio power amplifier circuit. A time interval shorter than a preset duration means that the voltage amplitude of the output signal is smaller than the preset amplitude, i.e., the output signal is small. Reducing the gain reduces the amplification factor of the input signal by the amplifier circuit, thereby adjusting the amplitude of the output signal.

[0111] When the output signal amplitude is low, the useful signal energy is weak, while the inherent noise in the circuit (such as thermal noise and quantization noise) is relatively fixed. Maintaining a high gain also amplifies the noise, resulting in a lower signal-to-noise ratio (SNR) in the output signal, which manifests as mixed noise or a noticeable background noise. Lowering the gain can reduce noise amplification, improve the SNR, and make the output audio signal purer, enhancing sound quality.

[0112] Furthermore, high gain means that the power transistors in the audio power amplifier circuit (such as the transistors in the H-bridge) need to switch quickly or withstand higher drive currents. Long-term operation increases component power consumption and heat generation, accelerating aging and even damage. In small-signal scenarios, where high power output is not necessary, lowering the gain reduces the switching frequency and current load of the power transistors, lowering circuit power consumption, extending component life, reducing electromagnetic interference (EMI), and improving system stability.

[0113] S605 : When the time interval is greater than the preset duration, increase the gain of the audio power amplifier circuit.

[0114] When the actual measured time interval is greater than the preset duration, it indicates that the current output signal amplitude exceeds the preset amplitude, that is, it is in a "large signal" or close to overload state.

[0115] When the output signal amplitude is large, it indicates that the input signal is strong or needs to drive a high-power load (such as a speaker). If the gain is still low at this time, the amplification capacity of the amplifier circuit will be insufficient, resulting in the output power not meeting the demand, which will manifest as low sound volume and compressed dynamic range.

[0116] Gain, in essence, is the amplification factor and is typically set based on the rated input-output relationship of the circuit design (e.g., a preset gain of 20dB). Increasing the gain for large signals allows the amplifier circuit to operate in its optimal linear region, ensuring accurate signal amplification while avoiding redundant amplification capacity waste caused by excessively low gain. Although the output amplitude is high for large signals, increasing the gain does not mean increasing the gain indefinitely; rather, it increases to the preset gain. If the gain is artificially suppressed for a long period of time, large input signals may force the circuit to compensate by increasing the supply voltage or current. This, in turn, increases the load on power transistors (such as H-bridge transistors), leading to overheating or damage.

[0117] Based on the same inventive concept, an embodiment of the present invention further provides a signal processing controller, Figure 15 FIG. 1 is a schematic diagram of the structure of a signal processing controller provided by an embodiment of the present invention. Figure 15 As shown, the signal processing controller 12 includes:

[0118] The signal acquisition module 110 is configured to acquire a first voltage signal outputted from a first output terminal and a second voltage signal outputted from a second output terminal of the audio power amplifier circuit.

[0119] The time measurement module 120 is configured to detect a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measure the time interval between the first edge event and the second edge event. The first edge event and the second edge event are voltage transition events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle.

[0120] The amplitude determination module 130 is configured to determine the amplitude of the output signal of the audio power amplifier circuit based on a comparison result between the time interval and a preset duration.

[0121] The similarities between the signal processing controller provided by the embodiment of the present invention and the amplitude detection method can be referred to the detailed description of the amplitude detection method, which will not be described in detail in the embodiment of the present invention.

[0122] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. An amplitude detection method, characterized in that: Used to detect the amplitude of the output signal of the audio power amplifier circuit, the amplitude detection method includes: Obtaining a first voltage signal outputted from a first output terminal and a second voltage signal outputted from a second output terminal of the audio power amplifier circuit; detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring a time interval between the first edge event and the second edge event; wherein the first edge event and the second edge event are voltage transition events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle; Based on a comparison result of the time interval and a preset duration, the amplitude of the output signal of the audio power amplifying circuit is determined.

2. The amplitude detection method according to claim 1, characterized in that: The first edge event is a rising edge of the first voltage signal, and the second edge event is a rising edge of the second voltage signal; The step of detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring a time interval between the first edge event and the second edge event comprises: When the rising edge of the first voltage signal is detected, the counter starts timing, and when the rising edge of the second voltage signal is detected, the counter stops timing and records the time interval.

3. The amplitude detection method according to claim 1, characterized in that: The first edge event is a falling edge of the first voltage signal, and the second edge event is a falling edge of the second voltage signal; The step of detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring a time interval between the first edge event and the second edge event comprises: When the falling edge of the first voltage signal is detected, the counter starts timing, and when the falling edge of the second voltage signal is detected, the counter stops timing and records the time interval.

4. The amplitude detection method according to claim 1, characterized in that: The first edge event is a rising edge of the first voltage signal, and the second edge event is a rising edge of the second voltage signal; The step of detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring a time interval between the first edge event and the second edge event comprises: When the rising edge of the second voltage signal is detected, the counter starts timing, and when the rising edge of the first voltage signal is detected, the counter stops timing and records the time interval.

5. The amplitude detection method according to claim 1, characterized in that: The first edge event is a falling edge of the first voltage signal, and the second edge event is a falling edge of the second voltage signal; The step of detecting a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measuring a time interval between the first edge event and the second edge event comprises: When the falling edge of the second voltage signal is detected, the counter starts timing, and when the falling edge of the first voltage signal is detected, the counter stops timing and records the time interval.

6. The amplitude detection method according to claim 1, characterized in that: After the step of determining the amplitude of the output signal of the audio power amplifying circuit based on the comparison result of the time interval and the preset duration, the amplitude detection method further includes: When the time interval is less than the preset duration, the gain of the audio power amplifying circuit is reduced.

7. The amplitude detection method according to claim 1, characterized in that: After the step of determining the amplitude of the output signal of the audio power amplifying circuit based on the comparison result of the time interval and the preset duration, the amplitude detection method further includes: When the time interval is greater than the preset duration, the gain of the audio power amplifying circuit is increased.

8. The amplitude detection method according to claim 1, characterized in that: The preset duration is positively correlated with the preset amplitude of the output signal.

9. The amplitude detection method according to claim 8, characterized in that: When the carrier signal used in the audio power amplifier circuit is a triangular wave signal, The preset duration Alternatively, when the carrier signal used in the audio power amplifying circuit is a sawtooth wave signal, The preset duration Among them, V signal_out represents the preset amplitude of the output signal, T is the period of the clock signal, and PVDD represents the power supply voltage of the H-bridge in the audio power amplifier circuit.

10. The amplitude detection method according to claim 1, characterized in that: The audio power amplifier circuit includes a PWM amplifier with differential output.

11. A signal processing controller, characterized in that: include: a signal acquisition module, configured to acquire a first voltage signal outputted from a first output terminal and a second voltage signal outputted from a second output terminal of the audio power amplifier circuit; a time measurement module, configured to detect a first edge event of the first voltage signal and a second edge event of the second voltage signal, and measure a time interval between the first edge event and the second edge event; wherein the first edge event and the second edge event are adjacent voltage transition events of the same polarity in the first voltage signal and the second voltage signal within the same clock cycle; The amplitude determination module is used to determine the amplitude of the output signal of the audio power amplifying circuit based on the comparison result of the time interval and the preset time length.