A triangular wave generator and its control method, chip, and amplifier
By designing a voltage generation module, a voltage-controlled oscillation module, and a phase-shifting output module for a triangular wave generator, stable triangular wave signals with different phases are generated, solving the problems of current superposition and electromagnetic interference in multi-channel Class D audio systems and improving the electromagnetic compatibility performance of the system.
Patent Information
- Application Number
- CN202611281185.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-11-10
AI Technical Summary
In multi-channel Class D audio systems, using triangular wave signals with the same phase causes the switching edges to concentrate, resulting in instantaneous current superposition and electromagnetic interference peaks, which affect the electromagnetic compatibility performance of the system.
A triangular wave generator is designed, including a voltage generation module, a voltage-controlled oscillator module, and a phase-shifted output module. The phase-shifted output module generates stable triangular wave signals with different phases through a resistor divider unit and a comparator unit. A phase-locked loop circuit is used to adjust the control voltage signal to achieve multi-channel phase-shifted output.
By outputting stable triangular wave signals with different phases, the superposition of synchronous current and electromagnetic interference peaks at the switching moments of multiple power amplifier channels are reduced, thereby improving the system's electromagnetic interference immunity.
Smart Images

Figure CN123074451A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of analog chip technology, and in particular to a triangular wave generator and its control method, chip, amplifier, computer-readable medium, and computer program product. Background Technology
[0002] Class D audio power amplifiers typically compare audio-related signals with a triangular wave carrier signal to generate modulation pulse signals that control the switching of power devices. In audio systems with multiple power amplification output channels, if each channel is modulated with a triangular wave reference signal of the same phase, the switching edges of each channel may occur at close intervals. This can lead to the superposition of instantaneous current and spectral energy, easily causing a momentary concentration of switching states, superposition of current spikes, and high concentration of energy, thus affecting the electromagnetic compatibility performance of the audio system. Summary of the Invention
[0003] This application provides a triangular wave generator and its control method, chip, amplifier, computer-readable storage medium, and computer program product, which can output stable triangular wave signals with different phases, is suitable for multi-channel phase-shifting output, and improves the electromagnetic compatibility of the system.
[0004] In a first aspect, this application provides a triangular wave generator, comprising: a voltage generation module, a voltage-controlled oscillator module, and a phase-shifted output module; the first input terminal of the voltage generation module is used to receive a clock reference signal, the second input terminal is used to receive a clock feedback signal, and the output terminal of the voltage generation module is connected to the control terminal of the voltage-controlled oscillator module; the output terminal of the voltage-controlled oscillator module is connected to a first signal output terminal, which is used to output a triangular wave signal; the phase-shifted output module includes a resistor voltage divider unit and a comparator unit; the resistor voltage divider unit includes P resistors and Q switches connected in series between a first reference voltage terminal and a second reference voltage terminal, one end of any one of the Q switches is connected between two adjacent resistors of the P resistors, and the other end of the Q switches is connected to the first input terminal of the comparator unit, with a voltage divider node provided between the two adjacent resistors; the second input terminal of the comparator unit is connected to the output terminal of the voltage-controlled oscillator module, and the output terminal of the comparator unit is connected to a second signal output terminal, which is used to output a phase-shifted square wave signal, which is used to generate a clock feedback signal.
[0005] In one possible implementation, the triangular wave generator also includes a frequency divider module. The input of the frequency divider module is connected to the output of the comparator unit, and the output of the frequency divider module is connected to the second input of the voltage generation module, which is used to generate a clock feedback signal based on the phase-shifted square wave signal.
[0006] In one possible implementation, the phase-shifted output module also includes a phase register, where the on / off states of the Q switches in the resistor divider unit are controlled by the phase selection signal output by the phase register.
[0007] In one possible implementation, the phase-shifted output module further includes a logic operation unit. The two input terminals of the logic operation unit are connected to the output terminal of the comparison unit and the sign selection bit of the phase register, respectively. This unit is used to output a phase-shifted square wave signal when the sign selection bit is in the first logic state and to output the inverted signal of the phase-shifted square wave signal when the sign selection bit is in the second logic state.
[0008] One possible implementation is that the voltage generation module includes: a frequency determination unit, a charge pump unit, and a loop filter unit connected in sequence; the frequency determination unit is used to receive a clock reference signal and a clock feedback signal, and outputs a charging control signal and a discharging control signal to the charge pump unit respectively; the charge pump unit is used to generate a pulse current signal according to the charging control signal or the discharging control signal; and the loop filter unit is used to generate a control voltage signal according to the pulse current signal.
[0009] In one possible implementation, the voltage-controlled oscillator module includes: a current generation unit, a logic unit, and a capacitor unit; the control terminal of the current generation unit is connected to the output terminal of the voltage generation module to receive a control voltage signal, and the current output terminal of the current generation unit is connected to the first terminal of the capacitor unit; the detection terminal of the logic unit is connected to the current output terminal of the current generation unit 210, and the first and second logic control terminals of the logic unit are respectively connected to the switch control terminal of the current generation unit, which is used to control the current output terminal of the current generation unit; the second terminal of the capacitor unit is connected to a reference potential terminal, and the first terminal of the capacitor unit serves as the output terminal of the voltage-controlled oscillator module; the logic unit includes a preset high-level voltage input terminal and a preset low-level voltage input terminal, which are used to control the first and second logic control terminals.
[0010] In one possible implementation, the current generation unit includes: a reference current circuit, a pull-up current mirror, a pull-down current mirror, and a charge / discharge switching switch; the reference current circuit is used to generate a reference current according to a control voltage signal; the pull-up current mirror and the pull-down current mirror are used to mirror the reference current according to a preset mirror ratio; the charge / discharge switching switch is used to selectively connect the pull-up current mirror or the pull-down current mirror to the first terminal of the capacitor unit under the control of the first logic control terminal and the second logic control terminal.
[0011] In one possible implementation, the current generation unit is used to: adjust the preset mirror ratio according to the division ratio of the frequency divider module; the division ratio is positively correlated with the preset mirror ratio.
[0012] One possible implementation is that the target amplitude of the triangular wave signal is the difference between the first reference voltage and the second reference voltage, and the target amplitude is positively correlated with the power supply voltage of the audio power amplifier and negatively correlated with the modulator gain of the audio power amplifier; the current generation unit is used to adjust the preset mirror ratio according to the target amplitude of the triangular wave signal.
[0013] In one possible implementation, the voltage-controlled oscillator module further includes a spread spectrum unit, which is connected to the first end of the capacitor unit and is used to output jitter current to the capacitor unit.
[0014] One possible implementation is that the spread spectrum unit includes at least one of the following: a random modulation circuit, a triangular wave modulation circuit, and a hybrid modulation circuit.
[0015] Secondly, this application provides a chip including the triangular wave generator provided in the first aspect.
[0016] Thirdly, this application provides a Class D audio power amplifier, including multiple chips as provided in the second aspect and multiple power amplification channels, wherein the multiple chips correspond one-to-one with the multiple power amplification channels, and the multiple chips are used to output triangular wave signals of different phases respectively.
[0017] Fourthly, this application provides a control method for a triangular wave generator, applied to the triangular wave generator provided in the first aspect. The control method includes: turning on a target switch connected to a target voltage divider node according to a phase selection signal, and using the voltage divider signal of the target voltage divider node as a threshold signal; comparing the triangular wave signal output by the voltage-controlled oscillator module with the threshold signal to generate a phase-shifted square wave signal; obtaining a clock feedback signal based on the phase-shifted square wave signal; comparing a clock reference signal with the clock feedback signal, and adjusting a control voltage signal according to the comparison result; and adjusting the charging current and discharging current supplied to the capacitor unit according to the control voltage signal so that the clock feedback signal meets a preset locking condition, and the capacitor unit outputs a triangular wave signal corresponding to the phase selection signal.
[0018] One possible implementation involves obtaining a clock feedback signal based on a phase-shifted square wave signal, including: dividing the phase-shifted square wave signal by frequency and using the divided signal as the clock feedback signal.
[0019] One possible implementation method for controlling the triangular wave generator includes adjusting the pulse current signal output by the charge pump unit by adjusting the compensation coefficient of the charge pump unit according to the power supply voltage of the Class D audio power amplifier.
[0020] One possible implementation method for controlling the triangular wave generator is to adjust the mirror ratio of the current mirror in the voltage-controlled oscillator module according to the division ratio of the frequency division module.
[0021] One possible implementation method for controlling the triangular wave generator includes adjusting the mirror ratio of the current mirror in the voltage-controlled oscillator module based on the amplitude transformation of the triangular wave signal corresponding to the modulator gain of the Class D audio power amplifier.
[0022] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods of the fourth aspect and any possible implementation thereof.
[0023] Sixthly, this application provides a computer program product comprising computer code or a computer program, which, when run, causes the methods in the fourth aspect and any possible implementation to be executed.
[0024] The triangular wave generator and its control method, chip, amplifier, computer-readable medium, and computer program products provided by the above-mentioned aspects of this application can achieve at least the following technical effects: The triangular wave generator of this application includes a voltage generation module, a voltage-controlled oscillator module, and a phase-shifted output module. The phase-shifted output module includes a resistor voltage divider unit and a comparator unit. The resistor voltage divider unit includes P resistors and Q switches connected in series between a first reference voltage terminal and a second reference voltage terminal. One end of any one of the Q switches is connected to two adjacent resistors among the P resistors, and the other end of the Q switches is connected to the first input terminal of the comparator unit. A voltage divider node is set between two adjacent resistors. The phase-shifted output module selects the voltage divider node connected to the comparator unit, converts the threshold corresponding to the selected voltage divider node into a phase-shifted square wave signal, and generates a clock feedback signal for phase-locked loop feedback based on the phase-shifted square wave signal, so that the phase of the triangular wave signal can change with the clock feedback signal. This application can set up a phase-independently adjustable triangular wave generator in different chips, so that the switches of multiple power amplification channels are staggered, thereby reducing the instantaneous current superposition and electromagnetic interference peak caused by synchronous switching and improving the system's anti-electromagnetic interference capability.
[0025] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] To gain a more complete understanding of this application and its beneficial effects, the following description will be provided in conjunction with the accompanying drawings, wherein the same reference numerals in the following description denote the same parts.
[0028] Figure 1 This is a schematic diagram of the structure of a triangular wave generator provided in an embodiment of this application; Figure 2 A circuit diagram of a triangular wave generator provided in an embodiment of this application; Figure 3 A signal schematic diagram of a triangular wave generator provided in an embodiment of this application; Figure 4 A logic diagram of a phase-out output module provided in an embodiment of this application; Figure 5 A control diagram of a phase register provided in an embodiment of this application; Figure 6 A schematic diagram of a random modulation circuit provided in an embodiment of this application; Figure 7 A schematic diagram of a triangular wave modulation circuit provided in an embodiment of this application; Figure 8 A flowchart illustrating a triangular wave generator control method provided in an embodiment of this application; Figure 9 This is a circuit diagram of a Class D audio power amplifier provided in an embodiment of this application.
[0029] Explanation of icon numbers: 10. Feedback module; 20. Comparison module; 30. Power module; 100. Voltage generation module; 110. Frequency determination unit; 120. Charge pump unit; 130. Loop filter unit; 200. Voltage-controlled oscillator module; 210. Current generation unit; 220. Logic unit; 230. Capacitor unit; 240. Spread spectrum unit; 300. Phase-out output module; 310. Resistor voltage divider unit; 320. Comparison unit; 400. Frequency divider module. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] A Class-D amplifier is a power amplifier that amplifies audio signals through switching. Its core principle is to utilize power devices (such as MOSFETs) operating in a switching state to convert the input analog audio signal into a high-frequency pulse signal (PWM or PDM), which is then converted back into an analog signal by a low-pass filter to drive the speaker. In a Class-D amplifier, a comparator compares the audio-related input signal with a triangular wave to generate a pulse width modulation (PWM) signal to drive the power devices.
[0032] The related technology generates a triangular wave through the linear charging and discharging of a capacitor. Its oscillation frequency is easily affected by temperature, voltage, and process angle, and the output phase is not adjustable. If a multi-channel Class D audio power amplifier uses an in-phase triangular wave signal, the switching edges of each channel may converge, easily causing instantaneous concentration of switching states, superimposed current spikes, and highly concentrated energy, affecting the electromagnetic compatibility performance of the audio system.
[0033] In view of this, embodiments of this application provide a triangular wave generator that can output stable triangular wave signals of different phases, which is suitable for multi-channel phase-shifting output and improves the system's anti-electromagnetic interference capability.
[0034] Please see Figure 1 , Figure 1 This is a schematic diagram of a triangular wave generator provided in an embodiment of this application. Figure 1 As shown, the triangular wave generator includes a voltage generation module 100, a voltage-controlled oscillator module 200, and a phase-shifted output module 300. The first input terminal of the voltage generation module 100 is used to receive a clock reference signal, and the second input terminal is used to receive a clock feedback signal. The output terminal of the voltage generation module 100 is connected to the control terminal of the voltage-controlled oscillator module 200. The output terminal of the voltage-controlled oscillator module 200 is connected to a first signal output terminal, which is used to output a triangular wave signal. The phase-shifted output module 300 includes a resistor voltage divider unit 310 and a comparator unit 320. The resistor voltage divider unit 310 includes P resistors and Q switches connected in series between the first reference voltage terminal and the second reference voltage terminal. One end of any one of the Q switches is connected between two adjacent resistors among the P resistors, and the other end of the Q switches is connected to the first input terminal of the comparator unit 320. A voltage divider node is provided between the two adjacent resistors. The second input terminal of the comparator unit 320 is connected to the output terminal of the voltage-controlled oscillator module 200, and the output terminal of the comparator unit 320 is connected to the second signal output terminal. The second signal output terminal is used to output a phase-shifted square wave signal, which is used to generate a clock feedback signal.
[0035] A voltage generation module 100, a voltage-controlled oscillator module 200, and a phase-shifted output module 300 are connected in sequence, and this circuit structure includes a phase-locked loop circuit. In this embodiment, the output terminal of the voltage-controlled oscillator module 200 is connected to a first signal output terminal for outputting a triangular wave signal; the output terminal of the phase-shifted output module 300 is connected to a second signal output terminal for outputting a phase-shifted square wave signal. Therefore, the triangular wave generator in this embodiment can simultaneously provide a triangular wave signal and a phase-shifted square wave signal related to the phase of the triangular wave signal.
[0036] One possible implementation is, such as Figure 1 As shown by the dashed line, the triangular wave generator also includes a frequency divider module 400. The input terminal of the frequency divider module 400 is connected to the output terminal of the comparison unit 320, and the output terminal of the frequency divider module 400 is connected to the second input terminal of the voltage generation module 100. The frequency divider module 400 is used to generate a clock feedback signal based on the phase-shifted square wave signal.
[0037] The clock reference signal is the reference clock signal input to the triangular wave generator, representing the reference frequency that the phase-locked loop (PLL) circuit aims to lock onto. The clock feedback signal is the feedback clock fed back from the output of the PLL circuit, representing the actual state of the current output at the target phase. The target phase represents the desired phase relationship between the triangular wave signal and the clock reference signal, which is determined by the phase-shifting output module 300. The clock feedback signals obtained at two adjacent different time points during the phase-locking process can be referred to as the pre-update clock feedback signal and the post-update clock feedback signal, respectively: the pre-update clock feedback signal reflects the loop state before the update, and the post-update clock feedback signal is formed by processing the pre-update triangular wave signal through phase shifting, logical operations, and frequency division. The voltage generation module 100 adjusts the control voltage signal according to the frequency or phase deviation between the clock reference signal and the current clock feedback signal, and after multiple rounds of feedback, until the post-update clock feedback signal meets the preset locking condition. This preset locking condition is used to characterize the triangular wave generator, including the PLL structure, entering a stable state. For example, if the frequency difference between the clock feedback signal and the clock reference signal is less than or equal to a preset frequency difference threshold, and the phase difference between the clock feedback signal and the clock reference signal is less than or equal to a preset phase difference threshold, it can be determined that the clock feedback signal meets a preset locking condition. In some embodiments, it can also be determined that the triangular wave generator has entered a stable state when the above conditions are met continuously for a preset number of comparison cycles.
[0038] For one possible implementation, please refer to [link / reference]. Figure 2 , Figure 2 This is a circuit diagram of a triangular wave generator provided in an embodiment of this application. Figure 2As shown, the voltage generation module 100 includes a frequency determination unit 110, a charge pump unit 120, and a loop filter unit 130 connected in sequence. The first input terminal of the frequency determination unit 110 receives an externally input clock reference signal, the second input terminal receives a clock feedback signal output by the frequency divider module 400, and the output terminal is connected to the charge pump unit 120. The output terminal of the charge pump unit 120 is connected to the loop filter unit 130, and the output terminal of the loop filter unit 130 is connected to the control terminal of the voltage-controlled oscillator module 200.
[0039] For example, the frequency determination unit 110 compares the frequency or phase of the clock reference signal with that of the clock feedback signal, and outputs a charging control signal UP and a discharging control signal DOWN to the charge pump unit 120, respectively. The charging control signal UP and the discharging control signal DOWN are two control signals used to control the charge pump unit 120. In one possible implementation, when the frequency of the clock reference signal is greater than the frequency of the clock feedback signal, the frequency determination unit 110 outputs the charging control signal UP to increase the frequency; when the frequency of the clock feedback signal is less than the frequency of the clock reference signal, the frequency determination unit 110 outputs the discharging control signal DOWN to decrease the frequency. In another possible implementation, the frequency determination unit 110 is a phase frequency detector (PFD).
[0040] For example, the charge pump unit 120 includes a pull-up current source and a pull-down current source connected in series between the power supply terminal Vdd and the ground terminal. The connection point of the pull-up current source and the pull-down current source serves as the output terminal of the charge pump unit 120, outputting a pulse current signal. Specifically, the pull-up current source is controlled by a series-connected pull-up switch K1, and the pull-down current source is controlled by a series-connected pull-down switch K2. When the pull-up switch K1 is turned on in response to the charging control signal UP, the charge pump unit 120 outputs a charging pulse current to the loop filter unit 130; when the pull-down switch K2 is turned on in response to the discharging control signal DOWN, the charge pump unit 120 draws a discharging pulse current from the loop filter unit 130. That is, the pulse current signal includes either a charging pulse current signal or a discharging pulse current signal. The on / off states of the pull-up switch K1 and the pull-down switch K2 are different; that is, when the pull-up switch K1 is on, the pull-down switch K2 is off. The pulse current signal output by the charge pump unit 120 is used to charge or discharge capacitors C1 and C2 in the loop filter unit 130, thereby controlling the magnitude of the voltage signal Vctrl output by the loop filter unit 130.
[0041] The loop filter unit 130 is connected to the charge pump unit 120. Based on the pulse current signal output by the charge pump unit 120, it generates a control voltage signal Vctrl for the voltage-controlled oscillator module 200. In one possible implementation, the loop filter unit 130 includes two filter branches: the first filter branch includes a filter capacitor C1 and a filter resistor R1 connected in series, and the second filter branch includes a filter capacitor C2. It is understood that the control voltage signal Vctrl is equal to the voltage across capacitor C2 and also equal to the voltage across filter resistor R1.
[0042] The voltage-controlled oscillator module 200 is connected to the voltage generation module 100. It generates a charging / discharging current based on a control voltage signal and obtains a triangular wave signal of the target phase based on this current. The voltage-controlled oscillator module 200 can control the frequency of the triangular wave signal according to the control voltage signal to generate a stable triangular wave signal. For one possible implementation, please refer to the following section. Figure 2 The voltage-controlled oscillator module 200 includes a current generation unit 210, a logic unit 220, and a capacitor unit 230. The control terminal of the current generation unit 210 is connected to the output terminal of the voltage generation module 100 to receive the control voltage signal Vctrl. The current output terminal of the current generation unit 210 is connected to the first terminal of the capacitor unit 230. The second terminal of the capacitor unit 230 is connected to the reference potential terminal. The first terminal of the capacitor unit 230 forms node A and serves as the output terminal of the voltage-controlled oscillator module 200, outputting a triangular wave signal Vramp. The reference potential terminal is the common reference potential terminal of the triangular wave generator, such as the ground terminal GND. The detection terminal of the logic unit 220 is connected to the current output terminal of the current generation unit 210. The first logic control terminal and the second logic control terminal of the logic unit 220 are respectively connected to the switch control terminal of the current generation unit 210. The switch control terminal is used to control the current output terminal of the current generation unit 210. The logic unit 220 includes a preset high-level voltage input terminal and a preset low-level voltage input terminal. The preset high-level voltage input terminal and the preset low-level voltage input terminal are used to control the first logic control terminal and the second logic control terminal.
[0043] For one possible implementation, please continue reading. Figure 2The current generation unit 210 includes a reference current circuit, a pull-up current mirror, a pull-down current mirror, and a charge / discharge switching switch. The reference current circuit generates a reference current based on the control voltage signal Vctrl. The pull-up and pull-down current mirrors mirror the reference current according to a preset mirroring ratio to form charging and discharging currents that can be provided to the capacitor unit 230, respectively. The charge / discharge switching switch, under the control of the first and second logic control terminals, selects whether to connect the pull-up or pull-down current mirror to the first terminal of the capacitor unit 230. When the control voltage signal Vctrl increases, the reference current and the corresponding mirrored current increase, and the charge / discharge slope of the capacitor unit 230 increases; when the control voltage signal Vctrl decreases, the reference current and the corresponding mirrored current decrease, and the charge / discharge slope of the capacitor unit 230 decreases.
[0044] The detection terminal of logic unit 220 is connected to the first terminal of capacitor unit 230. Logic unit 220 includes a preset high-level voltage input terminal and a preset low-level voltage input terminal to receive the preset high-level voltage VREFH and the preset low-level voltage VREFL, respectively. Logic unit 220 controls the logic control signals output by the first logic control terminal and the second logic control terminal based on the comparison result between the voltage of node A and VREFH and VREFL. For example, it controls the charging of capacitor unit 230 through the first logic control signal output by the first logic control terminal B1, or controls the discharging of capacitor unit 230 through the second logic control signal output by the second logic control terminal B2.
[0045] When the voltage of node A reaches or exceeds VREFH, logic unit 220 controls the charging path to disconnect and the discharging path to open, causing the pull-down current mirror to discharge capacitor unit 230; when the voltage of node A drops to or falls below VREFL, logic unit 220 controls the discharging path to disconnect and the charging path to open, causing the pull-up current mirror to charge capacitor unit 230. The voltage of node A thus alternates between VREFL and VREFH, forming a triangular wave signal.
[0046] For example, the reference current circuit includes a MOSFET Q1, and the pull-up current mirror and pull-down current mirror include MOSFETs Q2 to Q6. MOSFETs Q1, Q5, and Q6 are NMOS transistors, and MOSFETs Q2 to Q4 are PMOS transistors. The gate of Q1 is connected to the voltage generation module 100 to receive the control voltage signal. The drain of Q1 is connected to the drain and gate of Q2, and the source of Q1 is grounded. Q2, Q3, and Q4 share a common gate. The sources of Q2 to Q4 are all connected to the power supply Vdd. The drain of Q3 is connected to the drain of Q5. The drain of Q4 is connected to the drain of Q6 through the third switch K3 and the fourth switch K4. The sources of Q5 and Q6 are connected to the ground terminal. The control terminal of the third switch K3 is connected to the first output terminal (B1) of the logic unit 220, and the control terminal of the fourth switch K4 is connected to the second output terminal (B2) of the logic unit 220. The connection terminals of the third switch K3 and the fourth switch K4 are the output terminals of the current generation unit 210, which is connected to the input terminal of the logic unit 220 and the capacitor unit 230, respectively.
[0047] Under the control of the control voltage signal, the reference current circuit turns on NMOS transistor Q1 to generate a reference current. PMOS transistors Q2 to Q4 form a pull-up current mirror connected to the power supply Vdd side. NMOS transistors Q5 and Q6 form a pull-down current mirror connected to the reference potential side. Capacitor unit 230 includes capacitor C0. The third switch K3 and the fourth switch K4 select the charging path or the discharging path in response to the first logic control signal B1 and the second logic control signal B2.
[0048] Please see Figure 3 (a), Figure 3 (a) is a signal schematic diagram of a triangular wave generator provided in an embodiment of this application. Figure 3 As shown in (a), the current generation unit 210 charges the capacitor C0 in the capacitor unit 230 through the pull-up current mirror in the charging state, and discharges through the pull-down current mirror in the discharging state. The voltage at point A increases linearly in the charging state and decreases linearly in the discharging state.
[0049] The phase-divided output module 300 includes a resistor voltage divider unit 310 and a comparator unit 320. The resistor voltage divider unit 310 includes P resistors and Q switches. The P resistors are connected in series between a first reference voltage terminal VREFH and a second reference voltage terminal VREFL. At least some or all of the adjacent resistors are connected to a voltage divider node. Each voltage divider node is connected to one of the Q switches. The output terminals of all switches are connected to the first input terminal of the comparator unit 320, and the second input terminal of the comparator unit 320 is connected to node A. Here, P and Q are both positive integers, and Q is less than or equal to P-1. Further, the phase-divided output module 300 may also include a phase register. The phase register's range selection bit controls the aforementioned switches; that is, the phase register's range selection bit is used to output a phase selection signal, which is used to control the on / off state of the Q switches in the resistor voltage divider unit 310. When a switch is activated at different positions, the threshold signal input to the comparator unit is different. In other words, different ranges correspond to different output threshold signals, and the two are in one-to-one correspondence. It can be understood that the range of the threshold signal is between the first reference voltage and the second reference voltage, and the voltage of the aforementioned voltage divider node and the voltage of the threshold signal mentioned here should be considered equal.
[0050] For example, please see Figure 4 , Figure 4 This is a logic diagram of a phase-reversed output module provided in an embodiment of this application. Figure 4 As shown, the phase-shifting output module 300 divides the triangular wave signal into several phase levels through the resistor voltage divider unit 310. In one example, P is seventeen, and the resistor voltage divider unit 310 includes seventeen resistors connected in series. Voltage divider nodes are set between each of the seventeen resistors, resulting in sixteen voltage divider nodes, each corresponding to one of the sixteen basic phase levels. Each voltage divider node is connected to a switch, resulting in sixteen switches in this case. The switch array activates a target switch based on the phase selection signal. The side of the activated target switch serves as the target voltage divider node. When Q is sixteen, the selectable target voltage divider node's voltage divider signal (e.g., using Vref_lad) is used. <n>(where n is any integer greater than or equal to 0 and less than or equal to Q) can be Vref_lad <0> To Vref_lad <15> If one of the voltage dividers is selected, then the voltage divider signal is used as the threshold signal input to the comparison unit 320.
[0051] The triangular wave signal Vramp passes through different voltage values sequentially within one cycle. Comparison unit 320 compares the triangular wave signal Vramp with the threshold signal input to the resistor divider unit 310, and flips the output state when the magnitude relationship between the two changes. Different voltage divider nodes of the resistor divider unit 310 correspond to different thresholds; therefore, when the triangular wave signal is compared with different preset threshold signals, the flipping time of comparison unit 320 is different. For the preset threshold signal corresponding to the lower phase level, the triangular wave signal will cross the threshold signal earlier during its rise, so the corresponding phase-shifted square wave signal will flip earlier; for the preset threshold signal corresponding to the higher phase level, the triangular wave signal will cross the threshold signal later during its rise, so the corresponding phase-shifted square wave signal will flip later. In this embodiment, the flipping time of comparison unit 320 within the triangular wave cycle changes with the selected voltage divider node, forming a phase-shifted square wave signal with the same frequency as the triangular wave signal and whose phase and duty cycle are controlled by the phase selection signal.
[0052] For one possible implementation, please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram illustrating the control of a phase register provided in an embodiment of this application. For example... Figure 5 As shown, the phase-shift output module 300 may further include a logic operation unit. The two input terminals of the logic operation unit are respectively connected to the output terminal of the comparison unit 320 and the sign selection bit of the phase register, for outputting a phase-shifted square wave signal when the sign selection bit is in a first logic state, and outputting an inverted signal of the phase-shifted square wave signal when the sign selection bit is in a second logic state. For example, the input terminals of this logic operation unit are respectively connected to the output terminal of the comparison unit 320 and the sign selection bit of the phase register, and the output terminal is connected to the input terminal of the frequency divider module 400.
[0053] The phase register also includes a sign selection bit, which controls the inverse update of the phase-shifted square wave signal. The phase-shifted output module 300 can further update the phase-shifted square wave signal according to the sign selection bit of the phase register to obtain the updated phase-shifted square wave signal. For example... Figure 5 As shown in (a), when the sign selection bit phase sel <4> When the first logic state is "0", the original phase-shifted square wave signal remains unchanged; for example... Figure 5 As shown in (b), when the sign selection bit phase sel <4> When the second logic state "1" is selected, the current phase-shifted square wave signal is logically flipped to obtain a phase-shifted square wave signal that is inverted compared to the original phase-shifted square wave signal. Alternatively, in actual implementation, a logic device whose logic state is opposite to the above logic state but whose output waveform is the same can also be selected. This application is not limited to this.
[0054] This application embodiment can further expand the phase output range based on the original phase shift control by controlling the sign of the phase, and change the original sixteen phase outputs into thirty-two phase outputs by using the sign selection bit.
[0055] Please continue reading. Figure 3 (b) shows the logic control signals and Figure 3 (c) shows a phase-shifted square wave signal. The logic control signal and the phase-shifted square wave signal have the same frequency as the triangular wave signal, but their phases are different. One possible implementation is that the duty cycle of the logic control signal is 50%, while the duty cycle of the phase-shifted square wave signal is different from that of the logic control signal.
[0056] One possible implementation is that the phase register may also be called a phase selection register, a selector, or other names, which are not limited in this application.
[0057] One possible implementation is that the phase register can be an XOR logic gate.
[0058] Furthermore, the phase register with the sign selection bit and the phase register with the gear selection bit provided in this application can be the same phase register or different phase registers. Alternatively, the phase register with the sign selection bit can be replaced by other devices with the same function, and this application is not limited thereto.
[0059] The frequency divider module 400 receives the phase-shifted square wave signal output by the comparison unit 320 or the logic operation unit, and generates an updated clock feedback signal according to a preset frequency division ratio N. The updated clock feedback signal is fed back to the frequency determination unit 110 to participate in the comparison as the current clock feedback signal in the next feedback adjustment cycle.
[0060] When the triangular wave generator is working, if there is a deviation between the current clock feedback signal and the clock reference signal that requires an increase in output frequency, the frequency determination unit 110 uses the charging control signal UP to cause the charge pump unit 120 to increase the control voltage signal Vctrl, thereby increasing the charging and discharging current provided by the current generation unit 210 to the capacitor unit 230 and shortening the triangular wave period. If there is a deviation that requires a decrease in output frequency, the frequency determination unit 110 uses the discharging control signal DOWN to decrease the control voltage signal Vctrl, thereby decreasing the charging and discharging current and extending the triangular wave period.
[0061] When the updated clock feedback signal and the clock reference signal meet the preset locking conditions, the feedback loop reaches a stable state. Since the clock feedback signal is formed based on the phase-shifted square wave signal corresponding to the selected voltage divider threshold, after the loop is locked, the phase of the triangular wave signal relative to the clock reference signal corresponds to the phase selection signal.
[0062] In this embodiment of the application, phase selection is achieved in the phase-out output module 300 through the physical connection relationship of multiple voltage divider nodes, switch array and comparator unit 320. Multiple phase levels can be formed with fewer circuit units, which makes it easy to replicate in the chip and independently control the multi-channel triangular wave generator.
[0063] The triangular wave generator of this application embodiment is applied to an audio power amplifier, such as an automotive audio power amplifier. The power supply voltage in an automotive system varies over a wide range; for example, the automotive power supply voltage PVDD fluctuates within a wide range of 4.5V to 45V.
[0064] In this embodiment, the loop transfer function TF of the above-mentioned triangular wave generator is expressed as: ; Where T2=R1C1, T1=R1 (C1 C2 / (C1+C2)).
[0065] Gain for charge pump unit 120, I p This represents the pulsed current signal output by charge pump unit 120, and k1 represents the compensation coefficient of charge pump unit 120. When a triangular wave generator is applied to an audio power amplifier, the power supply voltage PVDD of the audio power amplifier is related to the pulsed current signal I... p Proportional relationship. For example, PVDD / R=k1 I p Where R represents the resistance when compensating for the current of the charge pump unit 120. Therefore, with the increase of PVDD, the pulse current signal I of the charge pump unit 120... p Compensation can counteract the effect of PVDD changing into the amplitude of a triangular wave signal.
[0066] The gain of loop filter unit 130 is represented by C1 and C2, the capacitance of capacitors C1 and C2 in loop filter unit 130 is represented by R1, the resistance of R1 in loop filter unit 130 is represented by s, and the Laplace variable is represented by s. Under the condition of fixed circuit structure, the gain of loop filter unit 130 is basically unchanged, which will not be elaborated here.
[0067] This indicates the gain of the voltage-controlled oscillator module 200, g. m R2 represents the transconductance of the preceding stage, R2 represents the transconductance resistance, k2 represents the preset mirror ratio of the current mirror circuit, N represents the division ratio of the 400 frequency divider module, s represents the Laplace variable, and C VCO The value of capacitor C0 in capacitor unit 230 is represented by VREFH, which represents the preset high-level voltage of the triangular wave signal, and VREFL represents the preset low-level voltage of the triangular wave signal. (VREFH-VREFL) represents the amplitude of the triangular wave signal.
[0068] Based on the loop transfer function described above, it can be seen that the pulse current I output by the charge pump unit 120 is... p Loop parameters such as the frequency division ratio N, the current mirror ratio k2 of the voltage-controlled oscillator module 200, and the triangular wave amplitude VREFH-VREFL will all affect the loop gain of the triangular wave generator, and further affect the loop bandwidth, locking speed, and stability margin.
[0069] In automotive applications, the power stage supply voltage PVDD of a Class D audio power amplifier can vary over a wide range. The target amplitude of the triangular wave signal can be expressed as VREFH - VREFL = PVDD / GPWM, where GPWM is the gain of the power amplifier modulator in the current operating mode. PVDD is the supply voltage used to determine the power stage operating voltage and the triangular wave reference voltage range, while the internal circuit supply Vdd powers the charge pump, logic circuits, and current mirror, among other components.
[0070] The charge pump unit 120 may include a compensation current generation unit. The compensation current generation unit converts PVDD via resistor R into a current PVDD / R proportional to PVDD, and then couples this current to the charge pump unit 120 via a current mirror branch to adjust the pulse current Ip. k1 can represent the compensation current branch relative to the pulse current Ip. p The proportionality coefficient. When PVDD changes and causes a change in the amplitude (VREFH-VREFL) of the triangular wave signal, the compensation current generation unit adjusts the pulse current I output by the current generation unit 210 according to the proportionality coefficient k1. p This compensates for the impact of triangular wave amplitude variation on loop gain.
[0071] The frequency divider module 400 can change the frequency division ratio N to make the triangular wave generator output signals of different frequencies. When the frequency division ratio N increases, the gain term related to N in the loop transfer function changes accordingly.
[0072] In one possible implementation, the current generation unit 210 is further configured to: adjust a preset mirror ratio k2 according to the target amplitude of the triangular wave signal; the target amplitude is positively correlated with the preset mirror ratio k2.
[0073] The preset mirror ratio k2 of the current mirror circuit is positively correlated with the frequency division ratio N of the frequency divider module 400. When the frequency division ratio N increases, the amplification factor of the charging and discharging current relative to the reference current can be increased by increasing the preset mirror ratio k2 of the current mirror circuit; when the frequency division ratio N decreases, the amplification factor of the charging and discharging current relative to the reference current can be decreased by decreasing the preset mirror ratio k2 of the current mirror circuit.
[0074] In this embodiment of the application, when the frequency of the output triangular wave signal is adjusted based on the frequency division ratio N, the equivalent gain of the voltage-controlled oscillator module 200 can be compensated by adjusting the preset mirror ratio k2 in the current mirror circuit, thereby reducing the fluctuation of other loop parameters in the triangular wave generator caused by the change in the frequency division ratio and improving the loop stability of the phase-locked loop.
[0075] The target amplitude of the triangular wave signal is also related to other loop parameters. The target amplitude is the amplitude of the triangular wave signal in the current operating mode, denoted as VREFH. VREFL. When the power amplifier switches its operating mode, causing the GPWM to change, the target amplitude VREFH-VREFL of the triangular wave will change even if PVDD remains constant. When the target amplitude increases, the time required for capacitor unit 230 to complete one charge-discharge cycle increases, and the equivalent gain of voltage-controlled oscillator module 200 decreases, all while keeping the charging and discharging current constant; therefore, k2 can be increased to increase the charging and discharging current. When the target amplitude decreases, k2 can be decreased to decrease the charging and discharging current. In other words, when the GPWM changes, the magnitude of the charging and discharging current can also be adjusted by adjusting k2, thereby reducing the fluctuation of the parameters in the entire loop and improving the stability of the circuit.
[0076] The current mirror circuit in this embodiment can also adjust the preset mirror ratio according to the target amplitude of the triangular wave signal. When the target amplitude of the triangular wave signal increases, the current mirror circuit increases the preset mirror ratio to increase the charging and discharging current, thereby compensating for the decrease in the equivalent gain of the voltage-controlled oscillator module 200 caused by the increase in the target amplitude; when the target amplitude of the triangular wave signal decreases, the current mirror circuit decreases the preset mirror ratio to reduce the charging and discharging current, thereby reducing the occurrence of excessively high equivalent gain of the voltage-controlled oscillator module 200.
[0077] The aforementioned PVDD compensation, frequency division ratio N compensation, and GPWM compensation can be implemented individually or in combination. PVDD compensation is mainly achieved by adjusting the pulse current Ip or proportional coefficient k1 of the charge pump unit 120; frequency division ratio N and GPWM compensation are mainly achieved by adjusting the current mirror ratio k2 of the voltage-controlled oscillator module 200. These compensation relationships ensure that the loop bandwidth, lockout speed, and stability margin remain within the design range under different power supplies, frequencies, and operating modes.
[0078] Class D power amplifiers typically include multiple audio channels. Using triangular wave signals of the same phase across multiple channels can easily lead to concentrated switching, generating instantaneous current surges and affecting the system's electromagnetic interference (EMI) performance. This embodiment addresses this by setting up staggered output modules 300 on different channels, inputting clock feedback signals of different phases into the phase-locked loop (PLL). This disperses the switching times of multiple channels in time, reducing interference peaks caused by synchronous switching, improving the system's EMI performance, and reducing design complexity.
[0079] In addition, please refer to another possible implementation method. Figure 2 The voltage-controlled oscillator module 200 also includes a spread spectrum unit 240. The spread spectrum unit 240 is connected to the first end of the capacitor unit 230 and is configured to output jitter current to the capacitor unit 230.
[0080] Class D power amplifiers generate pulse width modulation signals to drive power devices based on triangular wave signals. When the triangular wave signal is a fixed frequency signal, the switching action of the power amplifier will also be concentrated at a fixed frequency, which can easily form sharp spectral peaks and affect the electromagnetic compatibility of the system.
[0081] The jitter current is superimposed with the charging or discharging current provided by the current generation unit 210, which disturbs the charging and discharging slope of the capacitor unit 230 and the voltage change slope on the capacitor unit 230. This causes the triangular wave signal output by the voltage-controlled oscillator module 200 to produce a frequency expansion effect, reduce the concentration of spectral energy, and improve the electromagnetic interference performance of the system.
[0082] One possible implementation is that the jitter current output by the spread spectrum unit 240 can be a bidirectional current or a unidirectional disturbance current. When the jitter current is bidirectional, it can be superimposed on the charging / discharging current in the same direction or canceled out in opposite directions. When the jitter current is unidirectional, it can be injected at different stages to disturb the charging / discharging process of the capacitor unit 230.
[0083] In one possible implementation, the spreading unit 240 includes at least one of the following: a random modulation circuit, a triangular wave modulation circuit, and a hybrid modulation circuit. The random modulation circuit generates random jitter current to achieve random spreading of the triangular wave signal. The triangular wave modulation circuit generates periodic jitter current to achieve periodic spreading of the triangular wave signal. The hybrid modulation circuit selects the current modulation period from multiple candidate modulation periods, thus combining the effects of random and periodic spreading.
[0084] Using a fixed-period modulation circuit to disturb the charging and discharging process of the voltage-controlled oscillator module 200 will easily result in a noticeable energy peak at the corresponding modulation frequency in the output spectrum due to the fixed modulation period. Taking a 96kHz modulation period as an example, a peak may be generated near the 96kHz frequency point in the output spectrum. This peak will cause the spectral energy to remain concentrated at some discrete frequency points, which is not conducive to further reducing peak interference.
[0085] For one possible implementation, please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram of a random modulation circuit provided in an embodiment of this application. Figure 6 As shown, the random modulation circuit includes: a random sequence generation circuit and a first conversion circuit; the random sequence generation circuit includes multiple cascaded flip-flops and a first feedback logic circuit, the first feedback logic circuit is connected to the multiple cascaded flip-flops and is configured to output a feedback signal to the first flip-flop in the cascaded flip-flops according to the output signal of at least one of the flip-flops, so that the multiple cascaded flip-flops output a random sequence signal; the first conversion circuit is connected to the random sequence generation circuit and is configured to generate a first jitter current according to the random sequence signal.
[0086] like Figure 6 Figure (a) shows the first conversion circuit in the random modulation circuit. This first conversion circuit is a digital-to-analog converter, including multiple current units for converting a random sequence signal into a first jitter current. Each current unit includes a pull-up current unit and a pull-down current unit. By controlling the pull-up current unit and the pull-down current unit, a unit current is generated. The unit currents of multiple units are superimposed, and the first jitter current is output at the common node VCM. In this embodiment, the first conversion circuit is connected to the random sequence signal sent by the random sequence generation circuit, and then controls each current unit according to the random sequence signal to generate the first jitter current. In one possible implementation, the first conversion circuit includes five current units to make the random disturbance distribution of the first jitter current smoother and more uniform, thereby improving the spread spectrum effect.
[0087] like Figure 6 Figure (b) shows a random sequence generation circuit in a random modulation circuit. This random sequence generation circuit includes multiple cascaded flip-flops and a first feedback logic circuit. The multiple flip-flops are cascaded sequentially, forming a structure similar to a feedback shift register. RSTN is a reset signal input to each flip-flop, used to initialize the flip-flops. One possible implementation is that the initial states of the multiple flip-flops are not all zero, but... Figure 6 Taking (b) as an example, the random sequence generation circuit includes 21 cascaded flip-flops. SET in the dashed box is a set signal, indicating that the flip-flop is initialized to "1" to reduce the probability of all-zero lock-up in the random sequence generation circuit. CLKIN is the clock signal input to each flip-flop. Driven by the clock signal CLKIN, the stored state of each flip-flop shifts sequentially. The first feedback logic circuit is connected to multiple cascaded flip-flops, generates a feedback signal based on the output signal of at least one of the cascaded flip-flops, and inputs the feedback signal to the first flip-flop in the multiple cascaded flip-flops. Thus, under the continuous action of the clock signal, the states of multiple flip-flops are continuously updated, causing the multiple cascaded flip-flops to output a random sequence signal. One possible implementation is that the random sequence signal has a long repetition period, making its repetition frequency less than 1Hz, which is much lower than the lower limit of the audio band, reducing the probability of forming obvious fixed-period modulation peaks within the audio band.
[0088] The random sequence generation circuit updates the random sequence signal upon triggering each clock signal. The first conversion circuit, correspondingly, controls the activation of the pull-up and pull-down current units based on this random sequence signal to obtain the first jitter current. One possible implementation is that the number of current units activated at each moment is different. Another possible implementation is that the number of pull-up or pull-down current units activated at each moment is different.
[0089] For one possible implementation, please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of a triangular wave modulation circuit provided in an embodiment of this application. Figure 7 As shown, the triangular wave modulation circuit includes: a cycle counting circuit and a second conversion circuit; the cycle counting circuit includes multiple cascaded flip-flops and a second feedback logic circuit, the second feedback logic circuit is connected to the multiple cascaded flip-flops and is configured to output a feedback signal to the first flip-flop in the cascaded flip-flops according to at least one output signal of the cascaded flip-flops, so that the multiple cascaded flip-flops output a cyclic sequence signal; the second conversion circuit is connected to the cycle counting circuit and is configured to generate a second jitter current according to the cyclic sequence signal.
[0090] Driven by a clock signal, the states of the cascaded flip-flops are passed step by step and returned to the previous stage via a second feedback logic circuit at a preset tap position, resulting in a cyclic sequence signal. In this embodiment, the period of the cyclic sequence is controlled by selecting the number of flip-flops participating in the loop counting circuit, thereby controlling the modulation period of the triangular wave modulation. A second current conversion circuit is connected to the loop counting circuit and is used to control the conduction state of multiple current units according to the cyclic sequence signal output by the loop counting circuit, so as to output a second jitter current. The second jitter current exhibits a gradually increasing and gradually decreasing variation pattern within one modulation period, thereby forming a periodic current with an approximate triangular wave shape.
[0091] Figure 7 Figure (a) shows the second conversion circuit in the triangular wave modulation circuit. This second conversion circuit is a digital-to-analog converter, including multiple current units for converting the cyclic sequence signal into a second jitter current. Each current unit includes a pull-up current unit and a pull-down current unit. By controlling the pull-up current unit and the pull-down current unit, a unit current is generated. The unit currents of multiple units are superimposed, and the second jitter current is output at the common node VCM. In this embodiment, the second conversion circuit is connected to the cyclic sequence signal, and then each current unit is controlled according to the cyclic sequence signal to generate the second jitter current. One possible implementation is that since the period variation of the cyclic counting circuit is related to the number of current units conducting in the second conversion circuit, and causes the depth of the second jitter current to change, the current output of each current unit under different modulation periods can be compensated by adjusting the ratio of current units in the second conversion circuit, so that the jitter depth under different modulation periods and different numbers of current units remains basically consistent.
[0092] Figure 7 Figure (b) shows the cyclic sequence generation circuit in a triangular wave modulation circuit. This cyclic sequence generation circuit includes multiple cascaded flip-flops and feedback logic circuits. The multiple flip-flops are cascaded sequentially, forming a structure similar to a feedback shift register. RSTN is the reset signal input to each flip-flop, used to initialize the flip-flops. One possible implementation is that the initial states of the multiple flip-flops are not all zero, with... Figure 7 Taking (b) as an example, the cyclic sequence generation circuit includes 33 cascaded flip-flops. SET within the dashed box is a set signal, indicating that the flip-flop is initialized to "1" to reduce the probability of all-zero lock-up in the cyclic sequence generation circuit. CLKIN is the clock signal input to each flip-flop. Driven by the clock signal CLKIN, the stored state of each flip-flop shifts sequentially. The second feedback logic circuit is connected to the multiple cascaded flip-flops, generating a feedback signal based on the output signals of the fifth, sixth, eleventh, twenty-second, and thirty-third flip-flops, and inputting the feedback signal to the first flip-flop in the cascaded circuit. Thus, under the continuous action of the clock signal, the states of the multiple flip-flops are continuously updated, causing the multiple cascaded flip-flops to output a cyclic sequence signal. In one possible implementation, the tap positions in the cascaded flip-flops can be adjusted as needed; this embodiment does not limit this.
[0093] One possible implementation involves a hybrid modulation circuit in the spread spectrum unit 240. This circuit utilizes random logic generated by a random modulation circuit as periodic control logic to randomly select the modulation period of the triangular wave modulation circuit. For example, the hybrid modulation circuit can preset multiple candidate modulation periods, such as a first modulation period corresponding to 48kHz and a second modulation period corresponding to 96kHz. The random modulation circuit selects between the first and second modulation periods, allowing the triangular wave modulation circuit to operate alternately under different modulation periods. When the probabilities of selecting the two modulation periods are approximately equal, the frequency after hybrid modulation is the statistical average modulation frequency, for example, the average of the frequencies corresponding to the two modulation periods. For instance, when the probabilities of selecting the 48kHz and 96kHz modulation periods are approximately equal, the statistical average modulation frequency after hybrid modulation can be 72kHz. It should be understood that 72kHz here is a statistical average value, not indicating that the hybrid modulation circuit actually operates at a fixed 72kHz, but rather indicating that over a longer time scale, after the modulation period randomly switches between 48kHz and 96kHz, its average modulation characteristic corresponds to around 72kHz.
[0094] In summary, in the triangular wave generator of this application embodiment, the jitter current is directly injected into the charging and discharging node of the capacitor unit 230, which can disperse the spectral energy of the triangular wave signal; the phase-shifted output module 300 generates a phase-shifted square wave signal by selecting a threshold and comparing, enabling different triangular wave generators to lock onto different phases. This application embodiment further combines the phase-shifted output module 300 and the spread spectrum unit 240, which can simultaneously reduce the peak energy at fixed frequency points and the peak energy of multi-channel synchronous switching.
[0095] In some embodiments, this application also provides a chip. The chip includes the aforementioned triangular wave generator. Each triangular wave generator can share a clock reference signal, or it can receive a synchronized clock reference signal separately.
[0096] The triangular wave generator in the chip selects the voltage divider node based on its own phase selection signal and sign selection, and generates a phase-shifted square wave signal, thereby locking the feedback loop of the triangular wave generator to the corresponding phase. The chip in this embodiment includes a triangular wave generator, thus enabling phase control of the output triangular wave signal.
[0097] This application also provides a control method for a triangular wave generator.
[0098] Referring to the triangular wave generator provided in this application, please refer to... Figure 8 , Figure 8 This is a flowchart illustrating a triangular wave generator control method provided in an embodiment of this application. The triangular wave generator includes a voltage generation module, a voltage-controlled oscillator module, a phase-shifted output module, and a frequency divider module connected in sequence. The frequency divider module is also connected to the voltage generation module. Figure 8 As shown, the triangular wave generator control method includes the following steps S810 to S850.
[0099] Step S810: Turn on the target switch connected to the target voltage divider node according to the phase selection signal, and use the voltage divider signal of the target voltage divider node as the threshold signal; Step S820: Compare the triangular wave signal output by the voltage-controlled oscillator module with the threshold signal to generate a phase-shifted square wave signal; Step S830: Obtain the clock feedback signal based on the phase-shifted square wave signal; Step S840: Compare the clock reference signal with the clock feedback signal, and adjust the control voltage signal according to the comparison result; In step S850, the charging current and discharging current supplied to the capacitor unit are adjusted according to the control voltage signal so that the clock feedback signal meets the preset locking condition, and the capacitor unit outputs a triangular wave signal corresponding to the phase selection signal.
[0100] by Figure 2 Taking the aforementioned triangular wave generator as an example, this embodiment compares the clock reference signal and the clock feedback signal input to the triangular wave generator; outputs a charging control signal UP or a discharging control signal DOWN to the charge pump unit based on the comparison result; the charge pump unit and the loop filter unit adjust the control voltage signal Vctrl according to the charging control signal UP or the discharging control signal DOWN; and adjust the charging current and discharging current supplied to the capacitor unit according to Vctrl, thereby changing the frequency of the triangular wave signal until the feedback loop meets the preset locking condition.
[0101] One possible implementation is that, in step S830, obtaining the clock feedback signal based on the phase-shifted square wave signal includes: dividing the phase-shifted square wave signal by frequency and using the divided signal as the clock feedback signal.
[0102] When the sign selection bit of the phase register is in the first logic state, the phase-shifted square wave signal output by the comparator unit can be used for frequency division; when the sign selection bit of the phase register is in the second logic state, the inverted signal of the phase-shifted square wave signal can be used for frequency division. By combining the phase selection signal and the sign selection bit, the target phase of the triangular wave signal relative to the clock reference signal can be controlled. One possible implementation of this control method further includes adjusting the pulse current output by the charge pump unit by adjusting the compensation coefficient of the charge pump unit according to the power supply voltage of the Class D audio power amplifier.
[0103] The power supply voltage PVDD of the audio power amplifier and the pulse current signal I output by the charge pump unit p Proportional relationship. For example, PVDD / R=k1 I p Where R represents the resistance when compensating for the current of charge pump unit 120, and I p Let k1 represent the pulse current signal output by charge pump unit 120, and k1 represent the compensation coefficient of charge pump unit 120. Therefore, as PVDD increases, the pulse current signal I of charge pump unit 120 can be adjusted by changing the compensation coefficient k1. p Compensation can counteract the effect of PVDD changing into the amplitude of a triangular wave signal.
[0104] One possible implementation of the control method further includes adjusting the mirror ratio of the current mirror in the voltage-controlled oscillator module according to the division ratio of the frequency division module.
[0105] The preset mirror ratio k2 of the current mirror circuit is positively correlated with the frequency division ratio N of the frequency divider module 400. When the frequency division ratio N increases, the amplification factor of the charging and discharging current relative to the reference current can be increased by increasing the preset mirror ratio k2 of the current mirror circuit; when the frequency division ratio N decreases, the amplification factor of the charging and discharging current relative to the reference current can be decreased by decreasing the preset mirror ratio k2 of the current mirror circuit.
[0106] In this embodiment of the application, when the frequency of the output triangular wave signal is adjusted based on the frequency division ratio N, the equivalent gain of the voltage-controlled oscillator module 200 can be compensated by adjusting the preset mirror ratio k2 in the current mirror circuit, thereby reducing the loop parameter fluctuations caused by the frequency division ratio change and improving the loop stability of the phase-locked loop.
[0107] One possible implementation of the control method further includes adjusting the mirror ratio of the current mirror in the voltage-controlled oscillator module according to the amplitude change of the triangular wave signal corresponding to the modulator gain of the Class D audio power amplifier.
[0108] The amplitude of the triangular wave signal is also related to the loop parameters in the triangular wave generator, and the amplitude of the triangular wave signal is related to the operating mode of the power amplifier, denoted as VREFH. VREFL = PVDD / GPWM. When the power amplifier switches its operating mode, causing a change in GPWM, the amplitude of the triangular wave VREFH-VREFL will change even if PVDD remains constant. When the amplitude of the triangular wave signal increases while the charging / discharging current remains constant, the time required for capacitor unit 230 to complete one charge / discharge cycle increases, and the equivalent gain of voltage-controlled oscillator module 200 decreases; therefore, k2 can be increased to increase the charging / discharging current. Conversely, when the amplitude of the triangular wave signal decreases, k2 can be decreased to reduce the charging / discharging current. In other words, when GPWM changes, the magnitude of the charging / discharging current can be adjusted by adjusting k2, thereby reducing the fluctuation of parameters in the entire loop and improving circuit stability.
[0109] One possible implementation of the control method further includes: controlling the spread spectrum unit 240 to inject random jitter current, periodic jitter current, or mixed jitter current into the capacitor unit 230, so that the instantaneous frequency of the triangular wave signal varies within the target range. Spread spectrum control and phase selection control can be executed independently or in combination.
[0110] It should be understood that for a detailed explanation of the specific working method and beneficial effects of the control method of the above-mentioned triangular wave generator, please refer to the embodiment of the above-mentioned triangular wave generator, which will not be elaborated here.
[0111] This application also provides a Class D audio power amplifier.
[0112] Please see Figure 9 , Figure 9 This is a circuit diagram of a Class D audio power amplifier provided for an embodiment of this application. Figure 9 As shown, the Class D audio power amplifier includes multiple chips and multiple power amplification channels provided in the aforementioned embodiments. Each chip corresponds to one of the multiple power amplification channels, and each chip is used to output triangular wave signals of different phases.
[0113] like Figure 9 Each power amplification channel includes a feedback module 10, a comparison module 20, and a power module 30. The feedback module 10 acquires a power feedback signal characterizing the output state of the corresponding power amplification channel. The comparison module 20 is connected to both the feedback module 10 and the aforementioned triangular wave generator, comparing the power feedback signal or an error signal generated from the power feedback signal with the triangular wave signal output by the corresponding triangular wave generator to generate a modulation pulse signal. The power module 30 includes a drive circuit and a power switch, controlling the switching on and off according to the modulation pulse signal to output a power amplified signal.
[0114] The power feedback signal is used to characterize the current operating state of the power amplifier. The power feedback signal can be the power amplifier's output voltage, output current, etc. The feedback module 10 outputs the power feedback signal to the comparison module 20. The comparison module 20 compares the feedback signal with a triangular wave signal generated by a triangular wave generator using pulse width modulation (PWM) via a comparator (COM). In this embodiment, by introducing the power feedback signal, the modulated pulse signal output by the comparison module 20 no longer depends solely on the fixed input signal, but can reflect the current output state of the power amplifier, thereby improving the stability and control accuracy of the amplifier output.
[0115] The chips connected to different power amplification channels each output triangular wave signals with different phases. Therefore, the modulation pulse edges and power switch operation times of each power amplification channel are staggered. Each channel can also be configured with random modulation, triangular wave modulation, or hybrid modulation to further disperse the spectral energy.
[0116] One possible implementation is that the Class D audio power amplifier is an in-vehicle audio amplifier, which includes four power amplification channels, corresponding to the left front channel, right front channel, left rear channel, and right rear channel, respectively. In this embodiment, four triangular wave generators can be used, each corresponding to one of the four power amplification channels. These four triangular wave generators, controlled by the phase-shifted output module 300, can generate 32 phase-shifted square wave signals with different phases.
[0117] To ensure the switching actions of the four power amplifier channels are distributed as evenly as possible within one cycle, this embodiment of the application divides the 32 phase levels evenly over 360° and assigns them to the four channels, with a phase difference of 11.25° between each level. The four channels can default to selecting phase levels 1, 9, 17, and 25, or equivalently, selecting four phase-shifted signals corresponding to 0°, 90°, 180°, and 270°. In this case, the phase difference between two adjacent channels is 90°, corresponding to eight phase level intervals. This embodiment of the application, through phase-shift control of the triangular wave signal generated by the triangular wave generator, can sequentially stagger the PWM switching edges of the four power amplifier channels within one cycle, reducing the instantaneous current superposition and electromagnetic interference peaks caused by simultaneous switching of multiple channels.
[0118] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described above.
[0119] This application provides a computer program product comprising computer code or a computer program, which, when run, causes the methods described above in this application to be performed.
[0120] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0121] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0122] The embodiments, implementation methods, and related technical features of this application can be combined and substituted for each other without conflict.
[0123] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.< / n>
Claims
1. A triangular wave generator, characterized in that, include: Voltage generation module (100), voltage-controlled oscillation module (200), and phase-out output module (300); The first input terminal of the voltage generation module (100) is used to receive a clock reference signal, and the second input terminal is used to receive a clock feedback signal. The output terminal of the voltage generation module (100) is connected to the control terminal of the voltage-controlled oscillator module (200). The output terminal of the voltage-controlled oscillator module (200) is connected to the first signal output terminal, which is used to output a triangular wave signal; The phase-shifted output module (300) includes a resistor voltage divider unit (310) and a comparator unit (320). The resistor voltage divider unit (310) includes P resistors and Q switches connected in series between the first reference voltage terminal and the second reference voltage terminal. One end of any one of the Q switches is connected between two adjacent resistors among the P resistors, and the other end of the Q switches is connected to the first input terminal of the comparator unit (320). A voltage divider node is provided between the two adjacent resistors. The second input terminal of the comparator unit (320) is connected to the output terminal of the voltage-controlled oscillator module (200), and the output terminal of the comparator unit (320) is connected to the second signal output terminal. The second signal output terminal is used to output a phase-shifted square wave signal, and the phase-shifted square wave signal is used to generate the clock feedback signal.
2. The triangular wave generator according to claim 1, characterized in that, The triangular wave generator also includes a frequency divider module (400), the input of which is connected to the output of the comparison unit (320), and the output of which is connected to the second input of the voltage generation module (100), for generating the clock feedback signal based on the phase-shifted square wave signal.
3. The triangular wave generator according to claim 1 or 2, characterized in that, The phase-shifted output module (300) further includes a phase register, and the on / off state of the Q switches in the resistor divider unit (310) is controlled by the phase selection signal output by the phase register.
4. The triangular wave generator according to claim 3, characterized in that, The phase-shifted output module (300) further includes a logic operation unit. The two input terminals of the logic operation unit are respectively connected to the output terminal of the comparison unit (320) and the sign selection bit of the phase register. The logic operation unit is used to output the phase-shifted square wave signal when the sign selection bit is in the first logic state, and to output the inverted signal of the phase-shifted square wave signal when the sign selection bit is in the second logic state.
5. The triangular wave generator according to any one of claims 2 to 4, characterized in that, The voltage generation module (100) includes a frequency determination unit (110), a charge pump unit (120), and a loop filter unit (130) connected in sequence. The frequency determination unit (110) is used to receive the clock reference signal and the clock feedback signal, and output a charging control signal and a discharging control signal to the charge pump unit (120) respectively. The charge pump unit (120) is used to generate a pulse current signal according to the charging control signal or the discharging control signal. The loop filter unit (130) is used to generate a control voltage signal according to the pulse current signal.
6. The triangular wave generator according to claim 5, characterized in that, The voltage-controlled oscillation module (200) includes: a current generation unit (210), a logic unit (220), and a capacitor unit (230); the control terminal of the current generation unit (210) is connected to the output terminal of the voltage generation module (100) to receive the control voltage signal, and the current output terminal of the current generation unit (210) is connected to the first terminal of the capacitor unit (230); the detection terminal of the logic unit (220) is connected to the current output terminal of the current generation unit (210), and the first logic control terminal and the second logic control terminal of the logic unit (220) are connected to each other. The control terminals are respectively connected to the switch control terminals of the current generation unit (210), and the switch control terminals are used to control the current output terminals of the current generation unit (210); the second terminal of the capacitor unit (230) is connected to the reference potential terminal, and the first terminal of the capacitor unit (230) serves as the output terminal of the voltage-controlled oscillator module (200); the logic unit (220) includes a preset high-level voltage input terminal and a preset low-level voltage input terminal, and the preset high-level voltage input terminal and the preset low-level voltage input terminal are used to control the first logic control terminal and the second logic control terminal.
7. The triangular wave generator according to claim 6, characterized in that, The current generation unit (210) includes: a reference current circuit, a pull-up current mirror, a pull-down current mirror, and a charge / discharge switching switch; the reference current circuit is used to generate a reference current according to the control voltage signal; the pull-up current mirror and the pull-down current mirror are respectively used to mirror the reference current according to a preset mirror ratio; the charge / discharge switching switch is used to select to connect the pull-up current mirror or the pull-down current mirror to the first terminal of the capacitor unit (230) under the control of the first logic control terminal and the second logic control terminal.
8. The triangular wave generator according to claim 7, characterized in that, The current generation unit (210) is used to: adjust the preset mirror ratio according to the division ratio of the frequency division module (400); the division ratio is positively correlated with the preset mirror ratio.
9. The triangular wave generator according to claim 7, characterized in that, The target amplitude of the triangular wave signal is the difference between the first reference voltage and the second reference voltage, and the target amplitude is positively correlated with the power supply voltage of the audio power amplifier and negatively correlated with the modulator gain of the audio power amplifier; the current generation unit (210) is used to adjust the preset mirror ratio according to the target amplitude of the triangular wave signal.
10. The triangular wave generator according to claim 6, characterized in that, The voltage-controlled oscillation module (200) further includes a spread spectrum unit (240), which is connected to the first end of the capacitor unit (230) and is used to output jitter current to the capacitor unit (230).
11. The triangular wave generator according to claim 10, characterized in that, The spread spectrum unit (240) includes at least one of the following: a random modulation circuit, a triangular wave modulation circuit, and a hybrid modulation circuit.
12. A chip, characterized in that, Includes the triangular wave generator as described in any one of claims 1 to 11.
13. A Class D audio power amplifier, characterized in that, It includes multiple chips as described in claim 12 and multiple power amplification channels, wherein each of the multiple chips corresponds to one of the multiple power amplification channels, and the multiple chips are used to output triangular wave signals of different phases respectively.
14. A control method for a triangular wave generator, characterized in that, The control method, applied to the triangular wave generator according to any one of claims 1 to 11, comprises: The target switch connected to the target voltage divider node is turned on according to the phase selection signal, and the voltage divider signal of the target voltage divider node is used as the threshold signal. The triangular wave signal output by the voltage-controlled oscillator module is compared with the threshold signal to generate a phase-shifted square wave signal; Based on the phase-shifted square wave signal, the clock feedback signal is obtained; The clock reference signal is compared with the clock feedback signal, and the control voltage signal is adjusted according to the comparison result; and The charging current and discharging current supplied to the capacitor unit are adjusted according to the control voltage signal so that the clock feedback signal meets the preset locking condition, and the capacitor unit outputs a triangular wave signal corresponding to the phase selection signal.
15. The method according to claim 14, characterized in that, The step of obtaining the clock feedback signal based on the phase-shifted square wave signal includes: The phase-shifted square wave signal is divided by frequency, and the divided signal is used as the clock feedback signal.
16. The method according to claim 14 or 15, characterized in that, The method further includes: Based on the power supply voltage of the Class D audio power amplifier, the pulse current signal output by the charge pump unit is adjusted by adjusting the compensation coefficient of the charge pump unit.
17. The method according to claim 14 or 15, characterized in that, The method further includes: Adjust the mirror ratio of the current mirror in the voltage-controlled oscillator module according to the division ratio of the frequency divider module.
18. The method according to claim 14 or 15, characterized in that, The method further includes: Adjust the mirror ratio of the current mirror in the voltage-controlled oscillator module according to the amplitude change of the triangular wave signal corresponding to the modulator gain of the Class D audio power amplifier.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method according to any one of claims 14 to 18.
20. A computer program product, characterized in that, The computer program product includes computer code or a computer program, which, when executed, performs the method as described in any one of claims 14 to 18.
