WO2013075413A1 - Pwm frequency control method and device for d-class power amplifier - Google Patents

Pwm frequency control method and device for d-class power amplifier Download PDF

Info

Publication number
WO2013075413A1
WO2013075413A1 PCT/CN2012/071216 CN2012071216W WO2013075413A1 WO 2013075413 A1 WO2013075413 A1 WO 2013075413A1 CN 2012071216 W CN2012071216 W CN 2012071216W WO 2013075413 A1 WO2013075413 A1 WO 2013075413A1
Authority
WO
WIPO (PCT)
Prior art keywords
variable
value
pwm frequency
signal
noise ratio
Prior art date
Application number
PCT/CN2012/071216
Other languages
French (fr)
Chinese (zh)
Inventor
李春雨
虞培良
李小建
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013075413A1 publication Critical patent/WO2013075413A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03FAMPLIFIERS
    • H03F3/00Amplifiers with only discharge tubes or only semiconductor devices as amplifying elements
    • H03F3/20Power amplifiers, e.g. Class B amplifiers, Class C amplifiers
    • H03F3/21Power amplifiers, e.g. Class B amplifiers, Class C amplifiers with semiconductor devices only
    • H03F3/217Class D power amplifiers; Switching amplifiers

Definitions

  • the invention relates to the field of mobile communication, in particular to a pulse width modulation (PWM, pulse width modulation) frequency control method and device for a class D power amplifier.
  • PWM pulse width modulation
  • Background technique PWM, pulse width modulation
  • FM Frequency Modulation
  • the FM receiving module can convert the FM broadcast signal into an audio signal, and then amplify the audio signal through the audio power amplifier and transmit it to the speaker for playback.
  • the operating frequency range of the FM receiver module is generally set to 87.5MHz ⁇ 108.0MHz, and the step size is lOOKHz, which means that the FM broadcast frequency is limited.
  • the FM receiver module must be equipped with an antenna to receive FM broadcast signals.
  • the handheld terminal generally uses the lead wire in the earphone as the antenna of the FM receiving module, but when the user listens to the wireless broadcast, the earphone must be inserted, which brings inconvenience to the user.
  • Some handheld terminals use a ceramic antenna as the antenna of the FM receiving module, but the price of the ceramic antenna is relatively expensive, which increases the cost of the handheld terminal.
  • the operating frequency of the FM receiving module can also be a frequency point; the step size is lOOKHz means: The frequency of each FM broadcast signal differs by at least 100KHz.
  • FIG. 1 is a schematic diagram of a lead wire of a speaker using a handheld terminal in the prior art as an antenna of an FM receiving module.
  • the microcontroller is connected to a class D power amplifier and an FM receiving module, and the FM receiving module is connected to the class D. Power amplifier.
  • the user usually evaluates the receiving effect of the FM receiving module from the sound played by the speaker.
  • the signal-to-noise ratio or signal-to-noise ratio, is usually used to evaluate the reception effect of the FM receiver module.
  • the FM receiving module utilizes the signal to noise ratio parameter to implement the function of automatic searching. That is: the FM receiving module starts from a certain operating frequency and increases the operating frequency by one step ( ⁇ ) to receive the FM broadcast signal. If the signal-to-noise ratio of the received FM broadcast signal exceeds a predetermined threshold, for example, 50 dB, at a certain operating frequency, it is regarded as a valid station, and the handheld terminal can set the FM receiver module to operate at this working frequency to receive the FM broadcast. signal.
  • a predetermined threshold for example, 50 dB
  • Class D power amplifier refers to: Class D audio power amplifier, which can convert the input analog audio signal into a PWM pulse signal, and then the PWM pulse signal controls the conduction or disconnection of the high power switching device to drive the speaker.
  • Class D audio power amplifiers are sometimes referred to as digital amplifiers.
  • the Class D power amplifier's PWM frequency is between 300KHz and 1200KHz.
  • the micro controller can set the frequency value of the PWM of the class D amplifier through the communication interface.
  • Class D power amplifiers Compared with general linear class AB power amplifier circuits, Class D power amplifiers have the characteristics of high efficiency and small size. However, Class D power amplifiers also have disadvantages. Specifically, since the output signal of the class D power amplifier is a large current and a high speed pulse width modulation switching signal, electromagnetic interference is generated, and the electromagnetic interference has a broad spectrum and directly affects The reception performance of the FM receiving module connected to it causes the reception quality to deteriorate, so that the sound played by the speaker contains more noise.
  • the invention provides a PWM frequency control method and device for a class D power amplifier, so as to solve the problem that the class D power amplifier generates electromagnetic interference to the FM receiving module in the prior art, so that the user cannot receive the clear wireless broadcast signal.
  • the invention provides a PWM frequency control method for a class D power amplifier, comprising:
  • the invention also provides a PWM frequency control device for a class D power amplifier, comprising: a signal to noise ratio acquisition module, an optimal PWM frequency acquisition module, and a PWM frequency setting module; wherein, a signal to noise ratio acquisition module is used for the class D
  • the power amplifier sequentially sets different PWM frequencies, and sequentially acquires the signal-to-noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module under different PWM frequencies of the class D power amplifier;
  • the optimal PWM frequency acquisition module is configured to obtain the PWM frequency value corresponding to the maximum signal to noise ratio in the signal to noise ratio, and use the PWM frequency value as the optimal PWM frequency;
  • the PWM frequency setting module is used to set the optimal PWM frequency to the PWM frequency of the Class D amplifier.
  • the signal-to-noise ratio of the FM broadcast signal received by the FM receiving module is obtained under different PWM frequencies of the class D power amplifier, and the class D power amplifier corresponding to the maximum signal to noise ratio is selected.
  • the PWM frequency value is used as the PWM frequency value of the best Class D amplifier.
  • the microcontroller When converting to a sound signal, the microcontroller finds the PWM frequency value of the best class D power amplifier for sound playback according to the current working frequency of the FM receiving module, thereby minimizing the electromagnetic interference of the class D power amplifier to the FM receiving module, so that the user Able to receive clear radio broadcast signals.
  • FIG. 1 is a schematic diagram of a lead wire of a speaker using a handheld terminal in the prior art as an antenna of an FM receiving module;
  • FIG. 2 is a flowchart of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention
  • FIG. 3 is a flowchart of detailed processing of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a PWM frequency control apparatus for a class D power amplifier according to an embodiment of the present invention. detailed description
  • the present invention provides a PWM frequency control method and device for the class D power amplifier, and the D Class amps have minimal electromagnetic interference to the FM receiver module.
  • FIG. 2 is a flowchart of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention.
  • the PWM frequency control method of the class D power amplifier includes the following processing: Step 201, sequentially setting different PWM frequencies for the class D power amplifier;
  • the variable may be preset and the variable is initialized, wherein the set variable includes four, respectively: a first variable storing an optimal PWM frequency, and a second variable storing a maximum signal to noise ratio , storing the third variable of the current signal to noise ratio, and storing the current The fourth variable of the PWM frequency.
  • Step 202 sequentially acquire the signal to noise ratio of the FM broadcast signal received by the FM receiving module under different PWM frequencies of the class D power amplifier.
  • step 201 and step 202 specifically perform the following processing: Step 1: Set the value of the fourth variable to the current PWM frequency value;
  • Step 2 Control the FM receiving module to receive the FM signal broadcast
  • Step 3 Obtain a signal-to-noise ratio value at the current PWM frequency from the FM receiving module.
  • Step 4 Store the signal-to-noise ratio value into the third variable.
  • Step 203 Acquire a PWM frequency value corresponding to a maximum signal to noise ratio in a signal to noise ratio, use a PWM frequency value as an optimal PWM frequency, and set an optimal PWM frequency to a PWM frequency of the class D power amplifier.
  • step 203 specifically includes the following processing:
  • Step 5 Compare the value of the third variable with the value of the second variable. If the value of the third variable is greater than the value of the second variable, store the value of the third variable to the second variable, and set the value of the fourth variable. Store to the first variable; if the value of the third variable is less than the second variable, keep the value of the first variable and the value of the second variable unchanged;
  • step size is 10KHz.
  • FIG. 3 is a flowchart of detailed processing of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included: Step 1. Set four variables and initialize them: Among them, the four variables are specifically:
  • D PWM B 500 KHz, this variable is used to store the PWM frequency value of the best Class D amplifier
  • FM SN B 0 dB, this variable is used to store the maximum value of the signal-to-noise ratio of the received FM broadcast signal;
  • D PWM 500 KHz, this variable is used to store the PWM frequency value of the current Class D amplifier
  • FM—SN 0 dB
  • Step 2 The microcontroller sets the Class D power amplifier PWM frequency value to D-PWM, and sends and receives a command to the FM receiving module to receive the FM broadcast signal, and then sends a signal-to-noise ratio query command to the FM receiving module. After receiving the signal-to-noise ratio value returned by the FM receiving module, the microcontroller stores the signal-to-noise ratio value in the FM-SN variable;
  • Step 3 Compare the size of FM-SN and FM-SN-B, if FM-SN is greater than or equal to
  • FM SN B D - PWM
  • FM_SN_B FM SN, if FM - SN is greater than or equal to FM - SN - B, then step 4;
  • Step 5 The microcontroller sets the PWM frequency value of the Class D amplifier to D—PWM—B, and ends. According to the above steps, you can get the data as shown in Table 1:
  • the step size is ⁇ , as can be seen from Table 1, the microcontroller sets the Class D power amplifier PWM frequency value: 500KHz, 510KHz, 520KHz , 530KHz, 540KHz, 550KHz, 560KHz, 570KHz, 580KHz, 590KHz, 600KHz.
  • the signal-to-noise ratio of the received FM broadcast signals is: 60dB, 58dB, 58dB, 59dB, 59dB, 60dB, 61dB, 60dB, 59dB, 58dB, 58dB. .
  • the received signal FM signal has a maximum signal-to-noise ratio (FM) SNR of 61 dB, and the corresponding Class D power amplifier PWM frequency value D-PWM-B is 560 kHz.
  • FM signal-to-noise ratio
  • the microcontroller sets the PWM frequency value of the optimal class D power amplifier according to the frequency of the FM receiving module, thereby minimizing the electromagnetic interference of the class D power amplifier to the FM receiving module, thereby enabling the user to receive clear Wireless broadcast signal.
  • FIG. 4 is a schematic structural diagram of a PWM frequency control device for a class D power amplifier according to an embodiment of the present invention.
  • the PWM frequency control device of the class D power amplifier includes: a signal to noise ratio acquisition module 40, an optimal PWM frequency acquisition module 42, and a PWM frequency setting module 44.
  • the respective modules of the embodiments of the present invention are described in detail below.
  • the signal to noise ratio acquisition module 40 is configured to sequentially set different PWMs for the class D power amplifiers. Frequency, in a different PWM frequency of the class D power amplifier, sequentially acquiring the signal to noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module;
  • the optimal PWM frequency acquisition module 42 is configured to obtain the PWM frequency value corresponding to the maximum signal to noise ratio in the signal to noise ratio, and use the PWM frequency value as the optimal PWM frequency;
  • the PWM frequency setting module 44 is configured to set the optimal PWM frequency to the PWM frequency of the class D amplifier.
  • the PWM frequency control device of the class D power amplifier of the embodiment of the invention further includes: a variable setting module, configured to set a variable and initialize a variable, wherein the variable comprises: a first variable storing an optimal PWM frequency, and storing a signal noise A second variable that is greater than the maximum value, a third variable that stores the current signal to noise ratio, and a fourth variable that stores the current PWM frequency.
  • a variable setting module configured to set a variable and initialize a variable, wherein the variable comprises: a first variable storing an optimal PWM frequency, and storing a signal noise A second variable that is greater than the maximum value, a third variable that stores the current signal to noise ratio, and a fourth variable that stores the current PWM frequency.
  • the signal-to-noise ratio acquisition module 40 is specifically configured to: set a value of the fourth variable to a current PWM frequency value; control an FM receiving module to receive an FM signal broadcast; obtain a signal-to-noise ratio value at a current PWM frequency from the FM receiving module; The noise ratio value is stored in the third variable.
  • the PWM frequency setting module 44 is specifically configured to: set the PWM frequency of the class D power amplifier to the value in the first variable.
  • FIG. 3 is a flowchart of detailed processing of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
  • Step 1 The variable setting module sets 4 variables and initializes them: Among them, 4 variables are specifically:
  • D PWM B 500 KHz, this variable is used to store the PWM frequency value of the best Class D amplifier
  • FM SN B 0 dB, this variable is used to store the maximum value of the signal-to-noise ratio of the received FM broadcast signal;
  • Step 2 The signal-to-noise ratio acquisition module of the microcontroller sets the PWM frequency value of the Class D power amplifier to D PWM, and sends a receiving command to the FM receiving module to receive the FM broadcast signal, and then sends a signal to noise ratio query command to the FM receiving module. After receiving the signal to noise ratio value returned by the FM receiving module, the signal to noise ratio obtaining module of the microcontroller stores the signal to noise ratio value in the FM_SN variable;
  • Step 5 The PWM frequency setting module of the microcontroller sets the PWM frequency value of the Class D power amplifier to D—PWM—B, and ends.
  • the microcontroller sets the PWM frequency value of the Class D power amplifier in turn: 500KHz, 510KHz, 520KHz, 530KHz, 540KHz, 550KHz, 560KHz, 570KHz, 580KHz, 590KHz, 600KHz.
  • the signal-to-noise ratio of the received FM broadcast signals is: 60dB, 58dB, 58dB, 59dB, 59dB, 60dB, 61dB, 60dB, 59dB, 58dB, 58dB. .
  • the received signal FM signal has a maximum signal-to-noise ratio FM SN B of 61 dB, and the corresponding Class D power amplifier PWM frequency value D PWM B is 560 KHz.
  • the PWM frequency of the class D power amplifier is sequentially set, and the signal to noise ratio of the FM broadcast signal received by the FM receiving module is obtained under different PWM frequencies of the class D power amplifier, and the signal to noise ratio is selected.
  • the PWM frequency value of the Class D power amplifier corresponding to the maximum value is used as the PWM frequency value of the best Class D power amplifier.
  • the microcontroller When the FM receiving module converts the FM broadcast signal into a sound signal, the microcontroller according to the FM Receiving the current working frequency of the module, finding the PWM frequency value of the best class D power amplifier for sound playback, thereby minimizing the electromagnetic interference of the class D power amplifier to the FM receiving module, so that the user can receive a clear wireless broadcast signal.

Abstract

Disclosed is a PWM frequency control method for a D-class power amplifier, including: setting different PWM frequencies for a D-class power amplifier successively; acquiring the signal to noise ratios of a frequency modulation (FM) broadcast signal received by an FM receiving module successively under different PWM frequencies of the D-class power amplifier; and acquiring the PWM frequency value corresponding to the signal to noise ratio maximum value in the signal to noise ratios, taking the PWM frequency value as the best PWM frequency, and setting the best PWM frequency as the PWM frequency of the D-class power amplifier. Disclosed at the same time is a PWM frequency control device for a D-class power amplifier. The method and device in the present invention can be applied to effectively reduce the electromagnetic interference to the FM receiving module by the D-class power amplifier, so that the user can receive a distinct radio broadcast signal.

Description

D类功放的 PWM频率控制方法及装置 技术领域  PWM frequency control method and device for class D power amplifier
本发明涉及移动通讯领域, 特别是涉及一种 D类功放的脉沖宽度调制 ( PWM, Pulse Width Modulation )频率控制方法及装置。 背景技术  The invention relates to the field of mobile communication, in particular to a pulse width modulation (PWM, pulse width modulation) frequency control method and device for a class D power amplifier. Background technique
目前, 随着移动通信技术的成熟与发展, 手持设备如手机、 MP3 等的 功能越来越多, 这些功能给人们带来了很大的方便。 目前, 许多手持设备 都配备了频率调制 (FM, Frequency Modulation )接收模块, 具有接收 FM 广播信号的功能, 大大方便了用户收听 FM节目。  At present, with the maturity and development of mobile communication technologies, more and more functions of handheld devices such as mobile phones and MP3s have brought great convenience to people. At present, many handheld devices are equipped with a frequency modulation (FM, Frequency Modulation) receiving module, which has the function of receiving FM broadcast signals, which greatly facilitates users to listen to FM programs.
FM接收模块可以将 FM广播信号转换成音频信号,然后通过音频功率 放大器将音频信号放大后, 传送给扬声器进行播放。  The FM receiving module can convert the FM broadcast signal into an audio signal, and then amplify the audio signal through the audio power amplifier and transmit it to the speaker for playback.
在中国, FM 接收模块的工作频率范围一般设置为 87.5MHz 〜 108.0MHz, 步长为 lOOKHz, 这说明 FM广播的工作频率是有限的。 FM接 收模块必须配备天线才可较好的接收 FM广播信号。 手持终端一般采用耳 机中的引线作为 FM接收模块的天线, 但这样用户在收听无线广播时, 必 须插着耳机, 给用户带来了不便。 有的手持终端采用陶瓷天线作为 FM接 收模块的天线, 但陶瓷天线的价格较贵, 增加了手持终端的成本。 这里, FM接收模块的工作频率还可以成为频点; 步长为 lOOKHz是指: 每个 FM 广播信号的频率之间至少相差 100KHz。  In China, the operating frequency range of the FM receiver module is generally set to 87.5MHz ~ 108.0MHz, and the step size is lOOKHz, which means that the FM broadcast frequency is limited. The FM receiver module must be equipped with an antenna to receive FM broadcast signals. The handheld terminal generally uses the lead wire in the earphone as the antenna of the FM receiving module, but when the user listens to the wireless broadcast, the earphone must be inserted, which brings inconvenience to the user. Some handheld terminals use a ceramic antenna as the antenna of the FM receiving module, but the price of the ceramic antenna is relatively expensive, which increases the cost of the handheld terminal. Here, the operating frequency of the FM receiving module can also be a frequency point; the step size is lOOKHz means: The frequency of each FM broadcast signal differs by at least 100KHz.
在现有技术中, 还一种技术, 即采用手持终端的扬声器的引线作为 FM 接收模块的天线, 具有使用方便、 成本低的优点。 图 1 为现有技术中采用 手持终端的扬声器的引线作为 FM接收模块的天线的示意图, 如图 1所示, 微控制器连接 D类功率放大器和 FM接收模块, FM接收模块连接于 D类 功率放大器。 In the prior art, another technique is that the lead of the speaker of the handheld terminal is used as the antenna of the FM receiving module, which has the advantages of convenient use and low cost. FIG. 1 is a schematic diagram of a lead wire of a speaker using a handheld terminal in the prior art as an antenna of an FM receiving module. As shown in FIG. 1 , the microcontroller is connected to a class D power amplifier and an FM receiving module, and the FM receiving module is connected to the class D. Power amplifier.
主观上, 用户通常从扬声器播出的声音来评估 FM接收模块的接收效 果, 声音越清晰、 噪声越小, 说明 FM接收模块的播放效果越好。 客观上, 通常使用信噪比即信号噪声比率这一参数, 来评估 FM接收模块的接收效 果。 信噪比越大, 说明信号质量越好、 电子噪声越小, 从而使扬声器播出 的声音越清晰、 噪声越小。  Subjectively, the user usually evaluates the receiving effect of the FM receiving module from the sound played by the speaker. The clearer the sound and the smaller the noise, the better the playback effect of the FM receiving module. Objectively, the signal-to-noise ratio, or signal-to-noise ratio, is usually used to evaluate the reception effect of the FM receiver module. The larger the signal-to-noise ratio, the better the signal quality and the smaller the electronic noise, so that the sound of the speaker is clearer and the noise is smaller.
在现有技术中, FM接收模块就利用信噪比参数来实现自动搜台的功 能。 即: FM接收模块从某一工作频率开始, 每次工作频率增加一个步长 ( ΙΟΟΚΗζ ), 来接收 FM广播信号。 如果在某一工作频率下, 接收到的 FM 广播信号的信噪比超过预定阈值, 例如 50dB, 则视为一个有效电台, 手持 终端则可设置 FM接收模块工作在这一工作频率下来接收 FM广播信号。  In the prior art, the FM receiving module utilizes the signal to noise ratio parameter to implement the function of automatic searching. That is: the FM receiving module starts from a certain operating frequency and increases the operating frequency by one step ( ΙΟΟΚΗζ ) to receive the FM broadcast signal. If the signal-to-noise ratio of the received FM broadcast signal exceeds a predetermined threshold, for example, 50 dB, at a certain operating frequency, it is regarded as a valid station, and the handheld terminal can set the FM receiver module to operate at this working frequency to receive the FM broadcast. signal.
目前, 手持终端用于驱动扬声器的音频放大器, 普遍采用了 D类功放。 所谓 D类功放是指: D类音频功率放大器, 它能够将输入的模拟音频信号 变换成 PWM的脉沖信号,然后 PWM的脉沖信号去控制大功率开关器件的 导通或断开, 从而驱动扬声器。 这里, D 类音频功率放大器有时也称为数 字功放。 一般说来, D类功放的 PWM频率值在 300KHz〜 1200KHz。 微控 制器可以通过通讯接口进行设置 D类功放的 PWM的频率值。  Currently, D-class amplifiers are commonly used in audio amplifiers in which handheld terminals are used to drive speakers. The so-called Class D power amplifier refers to: Class D audio power amplifier, which can convert the input analog audio signal into a PWM pulse signal, and then the PWM pulse signal controls the conduction or disconnection of the high power switching device to drive the speaker. Here, Class D audio power amplifiers are sometimes referred to as digital amplifiers. In general, the Class D power amplifier's PWM frequency is between 300KHz and 1200KHz. The micro controller can set the frequency value of the PWM of the class D amplifier through the communication interface.
与一般的线性 AB类功放电路相比, D类功放具有效率高、体积小等特 点。 然而, D类功放也具有缺点, 具体地, 由于 D类功放的输出信号为大 电流且是高速度的脉宽调制开关信号, 所以会产生电磁干扰, 该电磁干扰 含有宽广的频谱, 会直接影响到与它连接的 FM接收模块的接收性能, 造 成接收质量下降, 从而使扬声器播出的声音含有较多的噪声。  Compared with general linear class AB power amplifier circuits, Class D power amplifiers have the characteristics of high efficiency and small size. However, Class D power amplifiers also have disadvantages. Specifically, since the output signal of the class D power amplifier is a large current and a high speed pulse width modulation switching signal, electromagnetic interference is generated, and the electromagnetic interference has a broad spectrum and directly affects The reception performance of the FM receiving module connected to it causes the reception quality to deteriorate, so that the sound played by the speaker contains more noise.
因此, 需要一种控制 D类功放 PWM频率的方法, 将 D类功放对 FM 接收模块的电磁干扰降至最低, 从而使用户接收到清晰的无线广播信号。 发明内容 Therefore, there is a need for a method of controlling the PWM frequency of a Class D power amplifier to minimize the electromagnetic interference of the Class D power amplifier to the FM receiving module, thereby enabling the user to receive a clear wireless broadcast signal. Summary of the invention
本发明提供一种 D类功放的 PWM频率控制方法及装置, 以解决现有 技术中 D类功放对 FM接收模块产生电磁干扰, 从而使用户无法接收到清 晰的无线广播信号的问题。  The invention provides a PWM frequency control method and device for a class D power amplifier, so as to solve the problem that the class D power amplifier generates electromagnetic interference to the FM receiving module in the prior art, so that the user cannot receive the clear wireless broadcast signal.
本发明提供一种 D类功放的 PWM频率控制方法, 包括:  The invention provides a PWM frequency control method for a class D power amplifier, comprising:
对 D类功放依次设置不同的 PWM频率;  Set different PWM frequencies for the Class D power amplifiers in turn;
在 D类功放不同的 PWM频率下,依次获取 FM接收模块接收到的 FM 广播信号的信噪比;  Obtaining the signal-to-noise ratio of the FM broadcast signal received by the FM receiving module in sequence under different PWM frequencies of the class D power amplifier;
获取信噪比中的信噪比最大值所对应的 PWM频率值,将 PWM频率值 作为最佳 PWM频率, 并将最佳 PWM频率设置为 D类功放的 PWM频率。  Obtain the PWM frequency value corresponding to the maximum SNR of the signal-to-noise ratio, use the PWM frequency value as the optimal PWM frequency, and set the optimal PWM frequency to the PWM frequency of the Class D amplifier.
本发明还提供了一种 D类功放的 PWM频率控制装置, 包括: 信噪比 获取模块、 最佳 PWM频率获取模块、 以及 PWM频率设置模块; 其中, 信噪比获取模块, 用于对 D类功放依次设置不同的 PWM频率, 在 D 类功放不同的 PWM频率下, 依次获取频率调制 FM接收模块接收到的 FM 广播信号的信噪比;  The invention also provides a PWM frequency control device for a class D power amplifier, comprising: a signal to noise ratio acquisition module, an optimal PWM frequency acquisition module, and a PWM frequency setting module; wherein, a signal to noise ratio acquisition module is used for the class D The power amplifier sequentially sets different PWM frequencies, and sequentially acquires the signal-to-noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module under different PWM frequencies of the class D power amplifier;
最佳 PWM频率获取模块,用于获取信噪比中的信噪比最大值所对应的 PWM频率值 , 将 PWM频率值作为最佳 PWM频率;  The optimal PWM frequency acquisition module is configured to obtain the PWM frequency value corresponding to the maximum signal to noise ratio in the signal to noise ratio, and use the PWM frequency value as the optimal PWM frequency;
PWM频率设置模块, 用于将最佳 PWM频率设置为 D类功放的 PWM 频率。  The PWM frequency setting module is used to set the optimal PWM frequency to the PWM frequency of the Class D amplifier.
本发明有益效果如下:  The beneficial effects of the present invention are as follows:
通过依次设置 D类功放的 PWM频率, 在 D类功放不同的 PWM频率 下,获取 FM接收模块的接收到的 FM广播信号的信噪比,并选出信噪比最 大值所对应的 D类功放的 PWM频率值, 作为最佳 D类功放的 PWM频率 值。 解决了现有技术中 D类功放对 FM接收模块产生电磁干扰, 从而使用 户无法接收到清晰的无线广播信号的问题,当 FM接收模块将 FM广播信号 转换为声音信号时, 微控制器根据 FM接收模块当前的工作频率, 找到最 佳 D类功放的 PWM频率值进行声音播放, 从而将 D类功放对 FM接收模 块的电磁干扰降至最低, 使得用户能够接收到清晰的无线广播信号。 附图说明 By sequentially setting the PWM frequency of the class D power amplifier, the signal-to-noise ratio of the FM broadcast signal received by the FM receiving module is obtained under different PWM frequencies of the class D power amplifier, and the class D power amplifier corresponding to the maximum signal to noise ratio is selected. The PWM frequency value is used as the PWM frequency value of the best Class D amplifier. The invention solves the problem that the class D power amplifier generates electromagnetic interference to the FM receiving module in the prior art, so that the user cannot receive the clear wireless broadcast signal, and the FM receiving signal will be the FM broadcast signal. When converting to a sound signal, the microcontroller finds the PWM frequency value of the best class D power amplifier for sound playback according to the current working frequency of the FM receiving module, thereby minimizing the electromagnetic interference of the class D power amplifier to the FM receiving module, so that the user Able to receive clear radio broadcast signals. DRAWINGS
图 1为现有技术中采用手持终端的扬声器的引线作为 FM接收模块的 天线的示意图;  1 is a schematic diagram of a lead wire of a speaker using a handheld terminal in the prior art as an antenna of an FM receiving module;
图 2为本发明实施例的 D类功放的 PWM频率控制方法的流程图; 图 3为本发明实施例的 D类功放的 PWM频率控制方法的详细处理的 流程图;  2 is a flowchart of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention; FIG. 3 is a flowchart of detailed processing of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention;
图 4为本发明实施例的 D类功放的 PWM频率控制装置的结构示意图。 具体实施方式  4 is a schematic structural diagram of a PWM frequency control apparatus for a class D power amplifier according to an embodiment of the present invention. detailed description
为了解决现有技术中 D类功放对 FM接收模块产生电磁干扰, 从而使 用户无法接收到清晰的无线广播信号的问题, 本发明提供了一种 D类功放 的 PWM频率控制方法及装置, 将 D类功放对 FM接收模块的电磁干扰降 至最低。 以下结合附图以及实施例, 对本发明进行进一步详细说明。 应当 理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不限定本发明。  In order to solve the problem that the class D power amplifier generates electromagnetic interference to the FM receiving module in the prior art, so that the user cannot receive the clear wireless broadcast signal, the present invention provides a PWM frequency control method and device for the class D power amplifier, and the D Class amps have minimal electromagnetic interference to the FM receiver module. The present invention will be further described in detail below in conjunction with the drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
方法实施例  Method embodiment
根据本发明的实施例, 提供了一种 D类功放的 PWM频率控制方法, 图 2为本发明实施例的 D类功放的 PWM频率控制方法的流程图, 如图 2 所示, 本发明实施例的 D类功放的 PWM频率控制方法包括如下处理: 步驟 201 , 对 D类功放依次设置不同的 PWM频率;  According to an embodiment of the present invention, a PWM frequency control method for a class D power amplifier is provided. FIG. 2 is a flowchart of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention. As shown in FIG. 2, the embodiment of the present invention The PWM frequency control method of the class D power amplifier includes the following processing: Step 201, sequentially setting different PWM frequencies for the class D power amplifier;
优选地, 在执行步驟 201 之前, 可以预先设置变量并将变量初始化, 其中, 设置的变量包括四个, 分别为: 存储最佳 PWM频率的第一变量、 存 储信噪比最大值的第二变量、 存储当前信噪比的第三变量、 以及存储当前 PWM频率的第四变量。 Preferably, before the step 201 is performed, the variable may be preset and the variable is initialized, wherein the set variable includes four, respectively: a first variable storing an optimal PWM frequency, and a second variable storing a maximum signal to noise ratio , storing the third variable of the current signal to noise ratio, and storing the current The fourth variable of the PWM frequency.
步驟 202 ,在 D类功放不同的 PWM频率下,依次获取 FM接收模块接 收到的 FM广播信号的信噪比;  Step 202: sequentially acquire the signal to noise ratio of the FM broadcast signal received by the FM receiving module under different PWM frequencies of the class D power amplifier.
优选地, 在实际应用中, 步驟 201和步驟 202具体进行如下处理: 步驟 1 , 将第四变量的值设置为当前 PWM频率值;  Preferably, in the actual application, step 201 and step 202 specifically perform the following processing: Step 1: Set the value of the fourth variable to the current PWM frequency value;
步驟 2, 控制 FM接收模块接收 FM信号广播;  Step 2: Control the FM receiving module to receive the FM signal broadcast;
步驟 3 , 从 FM接收模块获取当前 PWM频率下的信噪比值; 步驟 4, 将信噪比值存储至第三变量中。  Step 3: Obtain a signal-to-noise ratio value at the current PWM frequency from the FM receiving module. Step 4: Store the signal-to-noise ratio value into the third variable.
步驟 203 , 获取信噪比中的信噪比最大值所对应的 PWM 频率值, 将 PWM频率值作为最佳 PWM频率,并将最佳 PWM频率设置为 D类功放的 PWM频率。  Step 203: Acquire a PWM frequency value corresponding to a maximum signal to noise ratio in a signal to noise ratio, use a PWM frequency value as an optimal PWM frequency, and set an optimal PWM frequency to a PWM frequency of the class D power amplifier.
优选地, 在实际应用中, 步驟 203具体包括如下处理:  Preferably, in an actual application, step 203 specifically includes the following processing:
步驟 5, 比较第三变量的值和第二变量的值的大小, 如果第三变量的值 大于第二变量的值, 则将第三变量的值存储到第二变量, 将第四变量的值 存储到第一变量; 如果第三变量的值小于第二变量, 则保持第一变量的值 和第二变量的值不变;  Step 5: Compare the value of the third variable with the value of the second variable. If the value of the third variable is greater than the value of the second variable, store the value of the third variable to the second variable, and set the value of the fourth variable. Store to the first variable; if the value of the third variable is less than the second variable, keep the value of the first variable and the value of the second variable unchanged;
步驟 6,令第四变量的值=当前 PWM频率值 +预定步长值, 并判断第四 变量的值是否大于预先设置的功率最大值, 如果判断为是, 则获取第一变 量中的 PWM频率值, 将 D类功放的 PWM频率设置为第一变量的值, 如 果判断为否, 则执行步驟 1。  Step 6, the value of the fourth variable = the current PWM frequency value + the predetermined step value, and determine whether the value of the fourth variable is greater than a preset maximum power value. If the determination is yes, the PWM frequency in the first variable is obtained. Value, set the PWM frequency of the class D amplifier to the value of the first variable. If the determination is no, perform step 1.
以下结合附图, 对本发明实施例的上述技术方案进行详细说明。  The above technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
在本实例中, 假设该手持终端采用的 D类功放的 PWM频率值范围为 In this example, it is assumed that the PWM frequency range of the Class D power amplifier used by the handheld terminal is
500KHz ~ 600KHz, 步长为 10KHz。 500KHz ~ 600KHz, step size is 10KHz.
图 3为本发明实施例的 D类功放的 PWM频率控制方法的详细处理的 流程图, 如图 3所示, 包括如下处理: 步驟 1 , 设置四个变量, 并进行初始化: 其中, 四个变量具体为:FIG. 3 is a flowchart of detailed processing of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included: Step 1. Set four variables and initialize them: Among them, the four variables are specifically:
D PWM B = 500 KHz,该变量用于存储最佳的 D类功放的 PWM频率 值; D PWM B = 500 KHz, this variable is used to store the PWM frequency value of the best Class D amplifier;
FM SN B = 0 dB, 该变量用于存储接收到的 FM广播信号的信噪比的 最大值;  FM SN B = 0 dB, this variable is used to store the maximum value of the signal-to-noise ratio of the received FM broadcast signal;
D PWM = 500 KHz,该变量用于存储当前的 D类功放的 PWM频率值; D PWM = 500 KHz, this variable is used to store the PWM frequency value of the current Class D amplifier;
FM— SN = 0 dB, 该变量用于存储当前的 FM广播信号的信噪比。 FM—SN = 0 dB, this variable is used to store the signal-to-noise ratio of the current FM broadcast signal.
步驟 2, 微控制器设置 D类功放 PWM频率值为 D— PWM, 并发送接收 指令给 FM接收模块来接收 FM广播信号,再发送信噪比查询指令给 FM接 收模块。 微控制器收到 FM接收模块返回的信噪比数值后, 将信噪比数值 存储至 FM— SN变量中;  Step 2: The microcontroller sets the Class D power amplifier PWM frequency value to D-PWM, and sends and receives a command to the FM receiving module to receive the FM broadcast signal, and then sends a signal-to-noise ratio query command to the FM receiving module. After receiving the signal-to-noise ratio value returned by the FM receiving module, the microcontroller stores the signal-to-noise ratio value in the FM-SN variable;
步驟 3 , 比较 FM— SN与 FM— SN— B 的大小, 如果 FM— SN大于等于 Step 3: Compare the size of FM-SN and FM-SN-B, if FM-SN is greater than or equal to
FM SN B, 则令 D— PWM— B = D— PWM, FM_SN_B= FM SN,如果 FM— SN 大于等于 FM— SN— B, 则执行步驟 4; FM SN B, then D - PWM - B = D - PWM, FM_SN_B = FM SN, if FM - SN is greater than or equal to FM - SN - B, then step 4;
步驟 4, D PWM = D PWM +10K, 如果 D— PWM小于等于 600KHz, 则重复步驟 2、 步驟 3、 以及步驟 4, 如果 D— PWM大于 600KHz, 则执行 步驟 5;  Step 4, D PWM = D PWM +10K, if D-PWM is less than or equal to 600KHz, repeat steps 2, 3, and 4, if D-PWM is greater than 600KHz, perform step 5;
步驟 5, 微控制器设置 D类功放的 PWM频率值为 D— PWM— B, 结束。 按照上述步驟, 可以获得如表 1所示的数据:  Step 5: The microcontroller sets the PWM frequency value of the Class D amplifier to D—PWM—B, and ends. According to the above steps, you can get the data as shown in Table 1:
表 1  Table 1
D类功放 PWM频率值 FM广播信号的信噪比  Class D power amplifier PWM frequency value Signal to noise ratio of FM broadcast signal
500 KHz 60dB  500 KHz 60dB
510 KHz 58dB  510 KHz 58dB
520 KHz 58dB  520 KHz 58dB
530 KHz 59dB  530 KHz 59dB
540 KHz 59dB 550 KHz 60dB 540 KHz 59dB 550 KHz 60dB
560 KHz 61dB  560 KHz 61dB
570 KHz 60dB  570 KHz 60dB
580 KHz 59dB  580 KHz 59dB
590 KHz 58dB  590 KHz 58dB
600 KHz 58dB 在 D类功放的 PWM频率值范围为 500KHz〜 600KHz, 步长为 ΙΟΚΗζ 的情况下, 从表 1可以看出, 微控制器依次设置 D类功放 PWM频率值为: 500KHz、 510KHz、 520KHz、 530KHz、 540KHz、 550KHz、 560KHz、 570KHz、 580KHz、 590KHz、 600KHz。  600 KHz 58dB In the case of Class D power amplifier PWM frequency range from 500KHz to 600KHz, the step size is ΙΟΚΗζ, as can be seen from Table 1, the microcontroller sets the Class D power amplifier PWM frequency value: 500KHz, 510KHz, 520KHz , 530KHz, 540KHz, 550KHz, 560KHz, 570KHz, 580KHz, 590KHz, 600KHz.
FM接收模块在 D类功放不同的 PWM频率值的情况下 , 接收到的 FM 广播信号的信噪比依次为: 60dB、 58dB、 58dB、 59dB、 59dB、 60dB、 61dB、 60dB、 59dB、 58dB、 58dB。  When the FM receiver module has different PWM frequency values of the Class D amplifier, the signal-to-noise ratio of the received FM broadcast signals is: 60dB, 58dB, 58dB, 59dB, 59dB, 60dB, 61dB, 60dB, 59dB, 58dB, 58dB. .
可以看出,接收到的 FM广播信号的信噪比最大值 FM SN B为 61dB, 对应的 D类功放 PWM频率值 D— PWM— B为 560KHz。  It can be seen that the received signal FM signal has a maximum signal-to-noise ratio (FM) SNR of 61 dB, and the corresponding Class D power amplifier PWM frequency value D-PWM-B is 560 kHz.
通过上述处理, 微控制器根据将 FM接收模块的频率, 设置最佳的 D 类功放的 PWM频率值, 从而将 D类功放对 FM接收模块的电磁干扰降至 最低, 从而使用户接收到清晰的无线广播信号。  Through the above processing, the microcontroller sets the PWM frequency value of the optimal class D power amplifier according to the frequency of the FM receiving module, thereby minimizing the electromagnetic interference of the class D power amplifier to the FM receiving module, thereby enabling the user to receive clear Wireless broadcast signal.
装置实施例  Device embodiment
根据本发明的实施例, 提供了一种 D类功放的 PWM频率控制装置, 图 4为本发明实施例的 D类功放的 PWM频率控制装置的结构示意图, 如 图 4所示, 本发明实施例的 D类功放的 PWM频率控制装置包括: 信噪比 获取模块 40、 最佳 PWM频率获取模块 42、 以及 PWM频率设置模块 44 , 以下对本发明实施例的各个模块进行详细的说明。  According to an embodiment of the present invention, a PWM frequency control device for a class D power amplifier is provided. FIG. 4 is a schematic structural diagram of a PWM frequency control device for a class D power amplifier according to an embodiment of the present invention. As shown in FIG. The PWM frequency control device of the class D power amplifier includes: a signal to noise ratio acquisition module 40, an optimal PWM frequency acquisition module 42, and a PWM frequency setting module 44. The respective modules of the embodiments of the present invention are described in detail below.
具体地, 信噪比获取模块 40, 用于对 D类功放依次设置不同的 PWM 频率, 在 D类功放不同的 PWM频率下, 依次获取频率调制 FM接收模块 接收到的 FM广播信号的信噪比; Specifically, the signal to noise ratio acquisition module 40 is configured to sequentially set different PWMs for the class D power amplifiers. Frequency, in a different PWM frequency of the class D power amplifier, sequentially acquiring the signal to noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module;
最佳 PWM频率获取模块 42, 用于获取信噪比中的信噪比最大值所对 应的 PWM频率值 , 将 PWM频率值作为最佳 PWM频率;  The optimal PWM frequency acquisition module 42 is configured to obtain the PWM frequency value corresponding to the maximum signal to noise ratio in the signal to noise ratio, and use the PWM frequency value as the optimal PWM frequency;
PWM频率设置模块 44,用于将最佳 PWM频率设置为 D类功放的 PWM 频率。  The PWM frequency setting module 44 is configured to set the optimal PWM frequency to the PWM frequency of the class D amplifier.
优选地, 本发明实施例的 D类功放的 PWM频率控制装置还包括: 变 量设置模块, 用于设置变量并将变量初始化, 其中, 变量包括: 存储最佳 PWM频率的第一变量、 存储信噪比最大值的第二变量、 存储当前信噪比的 第三变量、 以及存储当前 PWM频率的第四变量。  Preferably, the PWM frequency control device of the class D power amplifier of the embodiment of the invention further includes: a variable setting module, configured to set a variable and initialize a variable, wherein the variable comprises: a first variable storing an optimal PWM frequency, and storing a signal noise A second variable that is greater than the maximum value, a third variable that stores the current signal to noise ratio, and a fourth variable that stores the current PWM frequency.
信噪比获取模块 40具体用于: 将第四变量的值设置为当前 PWM频率 值; 控制 FM接收模块接收 FM信号广播; 从 FM接收模块获取当前 PWM 频率下的信噪比值; 并将信噪比值存储至第三变量中。  The signal-to-noise ratio acquisition module 40 is specifically configured to: set a value of the fourth variable to a current PWM frequency value; control an FM receiving module to receive an FM signal broadcast; obtain a signal-to-noise ratio value at a current PWM frequency from the FM receiving module; The noise ratio value is stored in the third variable.
最佳 PWM频率获取模块 42具体用于: 比较第三变量和第二变量的大 小, 如果第三变量的值大于第二变量, 则将第三变量的值存储到第二变量, 将第四变量的值存储到第一变量; 如果第三变量的值小于第二变量, 则保 持第一变量的值和第二变量的值不变; 令第四变量 =当前 PWM频率值 +预 定步长值, 并判断第四变量的值是否大于预先设置的功率最大值, 如果判 断为是, 则获取第一变量中的 PWM频率值, 如果判断为否, 则调用信噪比 获取模块。  The optimal PWM frequency acquisition module 42 is specifically configured to: compare the size of the third variable and the second variable, and if the value of the third variable is greater than the second variable, store the value of the third variable to the second variable, and the fourth variable The value of the third variable is stored in the first variable; if the value of the third variable is smaller than the second variable, the value of the first variable and the value of the second variable are kept unchanged; let the fourth variable = current PWM frequency value + predetermined step value, And determining whether the value of the fourth variable is greater than a preset power maximum value. If the determination is yes, the PWM frequency value in the first variable is obtained, and if the determination is no, the signal to noise ratio acquisition module is invoked.
PWM频率设置模块 44具体用于: 将 D类功放的 PWM频率设置为第 一变量中的值。  The PWM frequency setting module 44 is specifically configured to: set the PWM frequency of the class D power amplifier to the value in the first variable.
以下结合附图, 对本发明装置实施例提供的技术方案进行详细说明。 在本实例中, 假设该手持终端采用的 D类功放的 PWM频率值范围为 500KHz ~ 600KHz, 步长为 10KHz。 图 3为本发明实施例的 D类功放的 PWM频率控制方法的详细处理的 流程图, 如图 3所示, 包括如下处理: The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings. In this example, it is assumed that the PWM frequency value of the class D power amplifier used in the handheld terminal ranges from 500 kHz to 600 kHz, and the step size is 10 kHz. FIG. 3 is a flowchart of detailed processing of a PWM frequency control method for a class D power amplifier according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
步驟 1 , 变量设置模块设置 4个变量, 并进行初始化: 其中, 4个变量 具体为:  Step 1. The variable setting module sets 4 variables and initializes them: Among them, 4 variables are specifically:
D PWM B = 500 KHz,该变量用于存储最佳的 D类功放的 PWM频率 值;  D PWM B = 500 KHz, this variable is used to store the PWM frequency value of the best Class D amplifier;
FM SN B = 0 dB, 该变量用于存储接收到的 FM广播信号的信噪比的 最大值;  FM SN B = 0 dB, this variable is used to store the maximum value of the signal-to-noise ratio of the received FM broadcast signal;
D PWM = 500 KHz,该变量用于存储当前的 D类功放的 PWM频率值; FM— SN = 0 dB, 该变量用于存储当前的 FM广播信号的信噪比。  D PWM = 500 KHz, this variable is used to store the PWM frequency value of the current Class D amplifier; FM_SN = 0 dB, this variable is used to store the signal-to-noise ratio of the current FM broadcast signal.
步驟 2, 微控制器的信噪比获取模块设置 D 类功放 PWM 频率值为 D PWM, 并发送接收指令给 FM接收模块来接收 FM广播信号, 再发送信 噪比查询指令给 FM接收模块。微控制器的信噪比获取模块收到 FM接收模 块返回的信噪比数值后, 将信噪比数值存储至 FM— SN变量中;  Step 2: The signal-to-noise ratio acquisition module of the microcontroller sets the PWM frequency value of the Class D power amplifier to D PWM, and sends a receiving command to the FM receiving module to receive the FM broadcast signal, and then sends a signal to noise ratio query command to the FM receiving module. After receiving the signal to noise ratio value returned by the FM receiving module, the signal to noise ratio obtaining module of the microcontroller stores the signal to noise ratio value in the FM_SN variable;
步驟 3 , 最佳 PWM频率获取模块比较 FM— SN与 FM— SN— B的大小, 如果 FM— SN大于等于 FM— SN— B, 则令 D— PWM— B = D PWM, FM SN B = FM— SN;  Step 3: The optimal PWM frequency acquisition module compares the size of FM_SN and FM_SN-B. If FM_SN is greater than or equal to FM_SN-B, then D-PWM-B = D PWM, FM SN B = FM — SN;
步驟 4, 最佳 PWM频率获取模块计算 D— PWM = D— PWM +10K, 如果 D PWM小于等于 600KHz,则重复步驟 2、步驟 3、以及步驟 4,如果 D— PWM 大于 600KHz, 则执行步驟 5;  Step 4: The optimal PWM frequency acquisition module calculates D—PWM = D—PWM +10K. If D PWM is less than or equal to 600KHz, repeat steps 2, 3, and 4. If D—PWM is greater than 600KHz, go to step 5. ;
步驟 5,微控制器的 PWM频率设置模块设置 D类功放的 PWM频率值 为 D— PWM— B, 结束。  Step 5: The PWM frequency setting module of the microcontroller sets the PWM frequency value of the Class D power amplifier to D—PWM—B, and ends.
按照上述步驟, 可以获得如表 1所示的数据。  According to the above steps, the data as shown in Table 1 can be obtained.
在 D类功放的 PWM频率值范围为 500KHz〜 600KHz, 步长为 ΙΟΚΗζ 的情况下, 从表 1可以看出, 微控制器依次设置 D类功放 PWM频率值为: 500KHz、 510KHz、 520KHz、 530KHz、 540KHz、 550KHz、 560KHz、 570KHz、 580KHz、 590KHz、 600KHz。 In the case that the PWM frequency value of the Class D power amplifier ranges from 500KHz to 600KHz, and the step size is ΙΟΚΗζ, it can be seen from Table 1 that the microcontroller sets the PWM frequency value of the Class D power amplifier in turn: 500KHz, 510KHz, 520KHz, 530KHz, 540KHz, 550KHz, 560KHz, 570KHz, 580KHz, 590KHz, 600KHz.
FM接收模块在 D类功放不同的 PWM频率值的情况下 , 接收到的 FM 广播信号的信噪比依次为: 60dB、 58dB、 58dB、 59dB、 59dB、 60dB、 61dB、 60dB、 59dB、 58dB、 58dB。  When the FM receiver module has different PWM frequency values of the Class D amplifier, the signal-to-noise ratio of the received FM broadcast signals is: 60dB, 58dB, 58dB, 59dB, 59dB, 60dB, 61dB, 60dB, 59dB, 58dB, 58dB. .
可以看出,接收到的 FM广播信号的信噪比最大值 FM SN B为 61dB, 对应的 D类功放 PWM频率值 D PWM B为 560KHz。  It can be seen that the received signal FM signal has a maximum signal-to-noise ratio FM SN B of 61 dB, and the corresponding Class D power amplifier PWM frequency value D PWM B is 560 KHz.
综上所述, 本发明实施例通过依次设置 D类功放的 PWM频率, 在 D 类功放不同的 PWM频率下,获取 FM接收模块接收到的 FM广播信号的信 噪比, 并选出信噪比最大值所对应的 D类功放的 PWM频率值, 作为最佳 D类功放的 PWM频率值。 解决了现有技术中 D类功放对 FM接收模块产 生电磁干扰,从而使用户无法接收到清晰的无线广播信号的问题, 当 FM接 收模块将 FM广播信号转换为声音信号时,微控制器根据 FM接收模块当前 的工作频率, 找到最佳 D类功放的 PWM频率值进行声音播放, 从而将 D 类功放对 FM接收模块的电磁干扰降至最低, 使得用户能够接收到清晰的 无线广播信号。  In summary, in the embodiment of the present invention, the PWM frequency of the class D power amplifier is sequentially set, and the signal to noise ratio of the FM broadcast signal received by the FM receiving module is obtained under different PWM frequencies of the class D power amplifier, and the signal to noise ratio is selected. The PWM frequency value of the Class D power amplifier corresponding to the maximum value is used as the PWM frequency value of the best Class D power amplifier. The invention solves the problem that the class D power amplifier generates electromagnetic interference to the FM receiving module in the prior art, so that the user cannot receive the clear wireless broadcast signal. When the FM receiving module converts the FM broadcast signal into a sound signal, the microcontroller according to the FM Receiving the current working frequency of the module, finding the PWM frequency value of the best class D power amplifier for sound playback, thereby minimizing the electromagnetic interference of the class D power amplifier to the FM receiving module, so that the user can receive a clear wireless broadcast signal.
尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人 员将意识到各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当 不限于上述实施例。  While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.

Claims

权利要求书 Claim
1、 一种 D类功放的脉沖宽度调制 PWM频率控制方法, 其特征在于, 该方法包括:  A pulse width modulation PWM frequency control method for a class D power amplifier, characterized in that the method comprises:
对 D类功放依次设置不同的 PWM频率;  Set different PWM frequencies for the Class D power amplifiers in turn;
在所述 D类功放不同的 PWM频率下, 依次获取频率调制 FM接收模 块接收到的 FM广播信号的信噪比;  Obtaining a signal to noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module in sequence under different PWM frequencies of the class D power amplifier;
获取所述信噪比中的信噪比最大值所对应的 PWM 频率值, 将所述 PWM频率值作为最佳 PWM频率 , 并将所述最佳 PWM频率设置为所述 D 类功放的 PWM频率。  Obtaining a PWM frequency value corresponding to a maximum signal to noise ratio in the signal to noise ratio, using the PWM frequency value as an optimal PWM frequency, and setting the optimal PWM frequency to a PWM frequency of the class D power amplifier .
2、 根据权利要求 1所述的方法, 其特征在于, 在对 D类功放依次设置 不同的 PWM频率之前, 该方法还包括:  2. The method according to claim 1, wherein before the setting of different PWM frequencies for the class D power amplifiers, the method further comprises:
设置变量并将所述变量初始化, 其中, 所述变量包括: 存储所述最佳 PWM频率的第一变量、 存储所述信噪比最大值的第二变量、 存储当前信噪 比的第三变量、 以及存储当前 PWM频率的第四变量。  Setting a variable and initializing the variable, wherein the variable comprises: a first variable storing the optimal PWM frequency, a second variable storing the maximum signal to noise ratio, and a third variable storing a current signal to noise ratio And a fourth variable that stores the current PWM frequency.
3、 根据权利要求 2所述的方法, 其特征在于, 所述在所述 D类功放不 同的 PWM频率下,依次获取频率调制 FM接收模块接收到的 FM广播信号 的信噪比, 包括:  The method according to claim 2, wherein, in the different PWM frequencies of the class D power amplifier, sequentially acquiring a signal to noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module, including:
将所述第四变量的值设置为当前 PWM频率值;  Setting the value of the fourth variable to a current PWM frequency value;
控制所述 FM接收模块接收 FM信号广播;  Controlling the FM receiving module to receive an FM signal broadcast;
从所述 FM接收模块获取当前 PWM频率下的信噪比值;  Obtaining a signal to noise ratio value at a current PWM frequency from the FM receiving module;
将所述信噪比值存储至所述第三变量中。  The signal to noise ratio value is stored into the third variable.
4、 根据权利要求 3所述的方法, 其特征在于, 所述获取所述信噪比中 的信噪比最大值所对应的 PWM频率值,将所述 PWM频率值作为最佳 PWM 频率, 包括:  The method according to claim 3, wherein the acquiring a PWM frequency value corresponding to a maximum signal to noise ratio in the signal to noise ratio, and using the PWM frequency value as an optimal PWM frequency, includes :
比较所述第三变量的值和所述第二变量的值的大小, 如果所述第三变 量的值大于所述第二变量的值, 则将所述第三变量的值存储到所述第二变 量, 将所述第四变量的值存储到所述第一变量; 如果所述第三变量的值小 于所述第二变量, 则保持所述第一变量的值和所述第二变量的值不变; 令第四变量的值等于当前 PWM频率值加预定步长值,并判断所述第四 变量的值是否大于预先设置的功率最大值, 如果所述第四变量的值大于预 先设置的功率最大值, 则获取所述第一变量中的 PWM频率值。 Comparing the value of the third variable with the magnitude of the value of the second variable, if the third variable If the value of the quantity is greater than the value of the second variable, storing the value of the third variable to the second variable, storing the value of the fourth variable to the first variable; If the value of the variable is smaller than the second variable, the value of the first variable and the value of the second variable are kept unchanged; the value of the fourth variable is equal to the current PWM frequency value plus a predetermined step value, and the Whether the value of the fourth variable is greater than a preset power maximum value, and if the value of the fourth variable is greater than a preset power maximum value, acquiring a PWM frequency value in the first variable.
5、 根据权利要求 4所述的方法, 其特征在于, 所述将所述最佳 PWM 频率设置为所述 D类功放的 PWM频率, 包括:  The method according to claim 4, wherein the setting the optimal PWM frequency to the PWM frequency of the class D power amplifier comprises:
将所述 D类功放的 PWM频率设置为所述第一变量的值。  The PWM frequency of the class D power amplifier is set to the value of the first variable.
6、根据权利要求 4或 5所述的方法,其特征在于, 该方法进一步包括: 如果所述第四变量的值小于等于预先设置的功率最大值, 则将所述第 四变量的值设置为当前 PWM频率值,控制 FM接收模块接收 FM信号广播 如此循环, 以在 D类功放不同的 PWM频率下, 依次获取到 FM接收模块 接收到的 FM广播信号的信噪比。  The method according to claim 4 or 5, wherein the method further comprises: if the value of the fourth variable is less than or equal to a preset power maximum value, setting the value of the fourth variable to The current PWM frequency value controls the FM receiving module to receive the FM signal broadcast in such a loop to sequentially acquire the signal to noise ratio of the FM broadcast signal received by the FM receiving module under different PWM frequencies of the class D power amplifier.
7、 一种 D类功放的脉沖宽度调制 PWM频率控制装置, 其特征在于, 该装置包括: 信噪比获取模块、 最佳 PWM频率获取模块、 以及 PWM频率 设置模块; 其中,  7. A pulse width modulation PWM frequency control device for a class D power amplifier, characterized in that: the device comprises: a signal to noise ratio acquisition module, an optimal PWM frequency acquisition module, and a PWM frequency setting module; wherein
信噪比获取模块, 用于对 D类功放依次设置不同的 PWM频率, 在所 述 D类功放不同的 PWM频率下, 依次获取频率调制 FM接收模块接收到 的 FM广播信号的信噪比;  a signal-to-noise ratio acquisition module is configured to sequentially set different PWM frequencies for the class D power amplifier, and sequentially obtain a signal to noise ratio of the FM broadcast signal received by the frequency modulation FM receiving module under different PWM frequencies of the class D power amplifier;
最佳 PWM频率获取模块,用于获取所述信噪比中的信噪比最大值所对 应的 PWM频率值 , 将所述 PWM频率值作为最佳 PWM频率;  An optimal PWM frequency acquisition module is configured to obtain a PWM frequency value corresponding to a maximum signal to noise ratio in the signal to noise ratio, and use the PWM frequency value as an optimal PWM frequency;
PWM频率设置模块,用于将所述最佳 PWM频率设置为所述 D类功放 的 PWM频率。  The PWM frequency setting module is configured to set the optimal PWM frequency to the PWM frequency of the class D power amplifier.
8、 根据权利要求 7所述的装置, 其特征在于, 该装置还包括: 变量设置模块, 用于设置变量并将所述变量初始化, 其中, 所述变量 包括:存储所述最佳 PWM频率的第一变量、存储所述信噪比最大值的第二 变量、 存储当前信噪比的第三变量、 以及存储当前 PWM频率的第四变量。 8. The device according to claim 7, wherein the device further comprises: a variable setting module, configured to set a variable and initialize the variable, wherein the variable includes: a first variable storing the optimal PWM frequency, a second variable storing the maximum signal to noise ratio, and storing a current letter The third variable of the noise ratio, and the fourth variable that stores the current PWM frequency.
9、 根据权利要求 8所述的装置, 其特征在于, 所述信噪比获取模块具 体用于: 将所述第四变量的值设置为当前 PWM频率值;控制所述 FM接收 模块接收 FM信号广播;从所述 FM接收模块获取当前 PWM频率下的信噪 比值; 将所述信噪比值存储至所述第三变量中。  The apparatus according to claim 8, wherein the signal to noise ratio acquisition module is configured to: set a value of the fourth variable to a current PWM frequency value; and control the FM receiving module to receive an FM signal. Broadcasting; acquiring a signal to noise ratio value at a current PWM frequency from the FM receiving module; storing the signal to noise ratio value in the third variable.
10、如权利要求 9所述的装置, 其特征在于, 所述最佳 PWM频率获取 模块具体用于: 比较所述第三变量的值和所述第二变量的值的大小, 如果 所述第三变量的值大于所述第二变量的值, 则将所述第三变量的值存储到 所述第二变量, 将所述第四变量的值存储到所述第一变量; 如果所述第三 变量的值小于所述第二变量, 则保持所述第一变量的值和所述第二变量的 值不变;令第四变量的值等于当前 PWM频率值加预定步长值,并判断所述 第四变量的值是否大于预先设置的功率最大值, 如果所述第四变量的值大 于预先设置的功率最大值, 则获取所述第一变量中的 PWM频率值。  The device according to claim 9, wherein the optimal PWM frequency acquisition module is specifically configured to: compare a value of the third variable with a value of a value of the second variable, if the The value of the third variable is greater than the value of the second variable, then the value of the third variable is stored to the second variable, and the value of the fourth variable is stored to the first variable; The value of the third variable is smaller than the second variable, and the value of the first variable and the value of the second variable are kept unchanged; the value of the fourth variable is equal to the current PWM frequency value plus a predetermined step value, and is determined. Whether the value of the fourth variable is greater than a preset power maximum value, and if the value of the fourth variable is greater than a preset power maximum value, acquiring a PWM frequency value in the first variable.
11、 根据权利要求 10所述的装置, 其特征在于, 所述 PWM频率设置 模块具体用于: 将所述 D类功放的 PWM频率设置为所述第一变量的值。  The device according to claim 10, wherein the PWM frequency setting module is specifically configured to: set a PWM frequency of the class D power amplifier to a value of the first variable.
12、 根据权利要求 10或 11所述的装置, 其特征在于, 当所述第四变 量的值小于等于预先设置的功率最大值时,所述最佳 PWM频率获取模块还 用于调用所述信噪比获取模块。  The device according to claim 10 or 11, wherein the optimal PWM frequency acquisition module is further configured to invoke the letter when the value of the fourth variable is less than or equal to a preset power maximum value. Noise ratio acquisition module.
PCT/CN2012/071216 2011-11-21 2012-02-16 Pwm frequency control method and device for d-class power amplifier WO2013075413A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110370813.6 2011-11-21
CN2011103708136A CN102510274A (en) 2011-11-21 2011-11-21 PWM frequency control method for class-D power amplifiers and device adopting same

Publications (1)

Publication Number Publication Date
WO2013075413A1 true WO2013075413A1 (en) 2013-05-30

Family

ID=46222332

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/071216 WO2013075413A1 (en) 2011-11-21 2012-02-16 Pwm frequency control method and device for d-class power amplifier

Country Status (2)

Country Link
CN (1) CN102510274A (en)
WO (1) WO2013075413A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780996B (en) * 2014-02-20 2018-10-02 深圳市京泉华科技股份有限公司 It is a kind of to eliminate circuit of the Switching Power Supply to the sound equipment AM noises generated
CN110572592A (en) * 2019-09-27 2019-12-13 深圳市掌锐电子有限公司 Anti-interference method and device for simultaneous working of high-definition automobile data recorder and FM (frequency modulation)
WO2023220861A1 (en) * 2022-05-16 2023-11-23 Techtronic Cordless Gp Radio and radio circuit including dual controllers
CN115483944B (en) * 2022-09-01 2023-12-05 浙江吉利控股集团有限公司 PWM control method and device, vehicle and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6917389B2 (en) * 2000-12-28 2005-07-12 Lg Electronics Inc. Linearization compensation system of digital TV relay apparatus and method thereof
CN101150325A (en) * 2006-09-19 2008-03-26 深圳市朗科科技有限公司 Method for automatically searching best frequency modulation transmission frequency point
CN101465667A (en) * 2007-12-18 2009-06-24 上海晨兴电子科技有限公司 Method for obtaining corresponding optimum channel of mobile phone FM receiving station
WO2010072031A1 (en) * 2008-12-25 2010-07-01 深圳世强电讯有限公司 Fm broadcast receiving circuit for portable product
US20110142178A1 (en) * 2009-12-16 2011-06-16 Realtek Semiconductor Corp. Device and method for controlling frequency resonance point of an antenna

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7110737B2 (en) * 2002-05-14 2006-09-19 Sony Corporation Audio equipment and control method of audio equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6917389B2 (en) * 2000-12-28 2005-07-12 Lg Electronics Inc. Linearization compensation system of digital TV relay apparatus and method thereof
CN101150325A (en) * 2006-09-19 2008-03-26 深圳市朗科科技有限公司 Method for automatically searching best frequency modulation transmission frequency point
CN101465667A (en) * 2007-12-18 2009-06-24 上海晨兴电子科技有限公司 Method for obtaining corresponding optimum channel of mobile phone FM receiving station
WO2010072031A1 (en) * 2008-12-25 2010-07-01 深圳世强电讯有限公司 Fm broadcast receiving circuit for portable product
US20110142178A1 (en) * 2009-12-16 2011-06-16 Realtek Semiconductor Corp. Device and method for controlling frequency resonance point of an antenna

Also Published As

Publication number Publication date
CN102510274A (en) 2012-06-20

Similar Documents

Publication Publication Date Title
CN204616044U (en) Based on the music share system of Bluetooth technology
CN203708487U (en) Bluetooth device with multifunctional coil
WO2015192711A1 (en) Pick-up device and method
KR100633052B1 (en) Apparatus for generating magnetic field for the hearing impaired in portable communication terminal
CN103237281B (en) The earphone line control circuit of a kind of mobile terminal and line control method
CN1960175A (en) Method and apparatus to control output power of a power amplifier and audio player having the same
CN101800520A (en) Realization method and realization system for automatic gain control
CN101401316B (en) Communication terminal for changing channel and channel changing method thereof
CN202602769U (en) Conversation type electronic product with echo inhibition function
WO2013075413A1 (en) Pwm frequency control method and device for d-class power amplifier
CN107277683B (en) Audio amplification system and method
CN203537555U (en) Audio device
CN101521699A (en) Mobile phone receiving frequency modulated signal by using built-in aerial and method thereof
CN102355618A (en) Modulated wave wireless microphone
CN101114846A (en) Blue tooth wireless multimedia transmission apparatus and system and method
CN101610306B (en) Radio communication device
CN202818545U (en) Wireless microphone
CN101807946A (en) Operating method of 2.4 G wireless audio device
US10368163B2 (en) Headset power supply and input voltage recognition
CN201887917U (en) Wireless microphone and receiver for teaching
CN105208514A (en) Slave equipment and master and slave equipment automatic matching system and method
CN201188660Y (en) Television embedded with wireless sound transmitting device
WO2018058997A1 (en) Networked speakers and system thereof
CN110324101B (en) Circuit, method and electronic equipment for playing FM broadcast program
CN203590427U (en) Bluetooth acoustic system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12851636

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12851636

Country of ref document: EP

Kind code of ref document: A1