A method, system and storage medium for intelligent control of MEMS speakers
By monitoring the load status in real time in MEMS speakers and dynamically adjusting the PWM wave parameters, the existing MEMS speakers' automatic volume adjustment function has solved the problems of high power consumption and low control efficiency, and low power consumption and high efficiency intelligent control is realized to ensure that the speakers output high-quality sound under different load conditions.
Patent Information
- Application Number
- CN202411245895.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The automatic volume adjustment function of existing portable MEMS speakers consumes a lot of power and has low control efficiency, which cannot meet users' diverse needs for high-quality audio output.
By measuring the inductance of the speaker and applying fixed PWM waves to control the sound state of the speaker, low-power consumption and high-efficiency intelligent control is achieved. Specific methods include obtaining the real-time load value of the speaker, the critical threshold of the overdamp and the critical threshold of the underdamp, judging the speaker status based on these values, and overdamp or underdamping adjustments by dynamically adjusting the high-level duty cycle and frequency of the PWM wave.
It effectively avoids the distortion problem of speakers under different load conditions, ensures that the speakers are always in the best sound state, reduces power consumption and improves control efficiency.
Smart Images

Figure CN118984436B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of loudspeakers, and in particular to an intelligent control method, system and storage medium of a MEMS loudspeaker. Background Art
[0002] With the popularity of portable electronic devices, the market demand for high-performance MEMS speakers is growing. These speakers have gradually become the core components of portable voice-enabled products due to their advantages such as low power consumption, high sensitivity and adjustable dynamic range. In order to meet users' demand for high-quality audio output, these speakers not only need to work stably for a long time in various complex environments, but also require real-time tuning functions to cope with environmental changes, speaker status changes and diverse user needs during use.
[0003] Currently, the technology of portable MEMS speaker devices is mostly limited to automatic volume adjustment outside of user interaction functions. Its working principle is to determine the volume level of the current environment by detecting the decibel size of the speaker output within a certain period of time, so as to adjust the output power of the speaker in real time to keep the decibel output of the speaker stable in the working state.
[0004] However, the prior art only has an automatic volume adjustment function, which consumes large power and has low control efficiency. Summary of the invention
[0005] The present invention provides an intelligent control method, system and storage medium of a MEMS speaker, which controls the sound state of the speaker by measuring inductance and applying a fixed PWM wave, making the sound more stable and achieving low power consumption and high efficiency control.
[0006] In a first aspect, in order to solve the above technical problems, the present invention provides an intelligent control method of a MEMS speaker, comprising:
[0007] Obtain the real-time load value, over-damping critical threshold and under-damping critical threshold of the loudspeaker;
[0008] Performing a comparison operation according to the over-damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker;
[0009] When the real-time load value of the loudspeaker is less than or equal to the over-damping critical threshold and greater than or equal to the under-damping critical threshold, it is determined that the loudspeaker is in a normal sounding state;
[0010] When the real-time load value of the speaker is greater than the over-damping critical threshold, the speaker is determined to be in an over-damping state, an over-damping adjustment operation is performed and the over-damping critical threshold is updated to obtain a PWM wave;
[0011] When the real-time load value of the speaker is less than the under-damping critical threshold, the speaker is in an under-damping state, an under-damping adjustment operation is performed and the under-damping critical threshold is updated to obtain a PWM wave;
[0012] According to the PWM wave, the sound generation process of the loudspeaker is adjusted to realize intelligent control of the sound generation state of the loudspeaker.
[0013] As an optional implementation manner, obtaining the real-time load value of the speaker includes:
[0014] Collect the capacitance charge value of the speaker;
[0015] According to the capacitor charge value, an average period of a periodic wave of the capacitor charge value is calculated to obtain a real-time load value of the speaker.
[0016] As an optional implementation manner, performing the over-damping adjustment operation and updating the over-damping critical threshold to obtain a PWM wave includes:
[0017] According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain an adjusted PWM wave;
[0018] The over-damping critical threshold is recalculated and updated based on the adjusted speaker state and the real-time load value.
[0019] As an optional implementation manner, recalculating and updating the over-damping critical threshold based on the adjusted speaker state and the real-time load value includes:
[0020] Based on the adjusted real-time load value of the loudspeaker and the preset over-damping correction coefficient, a product operation is performed to obtain a corrected over-damping critical threshold value;
[0021] According to the corrected over-damped critical threshold, smoothing is performed to obtain a smoothed corrected over-damped critical threshold;
[0022] The damping critical threshold is updated to a smoothed corrected over-damping critical threshold for subsequent speaker state determination and control operations.
[0023] As an optional implementation manner, performing the underdamping adjustment operation and updating the underdamping critical threshold to obtain the PWM wave includes:
[0024] According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain an adjusted PWM wave;
[0025] The underdamping critical threshold is recalculated and updated based on the adjusted speaker state and the real-time load value.
[0026] As an optional implementation manner, recalculating and updating the underdamping critical threshold based on the adjusted speaker state and the real-time load value includes:
[0027] Based on the adjusted real-time load value of the loudspeaker and the damping critical threshold, recalculating the under-damping critical threshold to obtain a modified under-damping critical threshold;
[0028] According to the under-damping critical threshold, smoothing processing is performed to obtain a smoothed corrected under-damping critical threshold;
[0029] The under-damping critical threshold is updated to the smoothed modified under-damping critical threshold for subsequent speaker state determination and control operations.
[0030] As an optional implementation manner, the recalculating the underdamping critical threshold to obtain the modified underdamping critical threshold includes:
[0031] Get the current over-damping critical threshold and under-damping critical threshold;
[0032] According to the current over-damping critical threshold and the under-damping critical threshold, the under-damping critical threshold is updated to obtain a modified under-damping critical threshold, and the calculation formula is as follows:
[0033] δ = H - γ;
[0034] Among them, δ represents the modified under-damping critical threshold; H represents the current over-damping critical threshold; γ represents a correction parameter, which is a key value used to adjust and optimize the under-damping critical threshold. By gradually reducing the voltage of the input speaker excitation signal, the frequency response of the speaker is gradually increased until the benchmark reference value is reached, thereby determining the correction parameter.
[0035] As an optional implementation, dynamically adjusting the high-level duty cycle and frequency of the PWM wave according to the real-time load value and the preset adjustment coefficient to obtain the adjusted PWM wave includes:
[0036] Get the real-time load value and speaker status of the current speaker;
[0037] According to the real-time load value and the speaker state, the high-level duty cycle of the PWM wave is calculated and dynamically adjusted to obtain a modified PWM wave duty cycle;
[0038] According to the real-time load value and the preset adjustment coefficient x, the frequency of the PWM wave is calculated and dynamically adjusted to obtain a modified PWM wave frequency;
[0039] An adjusted PWM wave signal is generated according to the modified PWM wave duty cycle and the modified PWM wave frequency.
[0040] In a second aspect, the present invention provides an intelligent control system for a MEMS speaker, comprising:
[0041] A data acquisition module, used to obtain a real-time load value, a damping critical threshold and an under-damping critical threshold of a loudspeaker;
[0042] A state determination module, used for performing a comparison operation according to the damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker;
[0043] A normal processing module, configured to, when the real-time load value of the speaker is less than or equal to the damping critical threshold and greater than or equal to the under-damping critical threshold, the speaker is in a normal sounding state;
[0044] An over-damping processing module, used for, when the real-time load value of the speaker is greater than the critical damping threshold, the speaker is in an over-damping state, performing an over-damping adjustment operation and updating the critical damping threshold to obtain a PWM wave;
[0045] An underdamping processing module, used for, when the real-time load value of the speaker is less than the underdamping critical threshold, the speaker is in an underdamping state, performing an underdamping adjustment operation and updating the underdamping critical threshold to obtain a PWM wave;
[0046] The intelligent control module is used to adjust the sound generation process of the loudspeaker according to the PWM wave so as to enable the loudspeaker to be intelligently controlled.
[0047] In a third aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned intelligent control methods for the MEMS speaker.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention provides an intelligent control method for a MEMS speaker, comprising: obtaining a real-time load value, an over-damping critical threshold and an under-damping critical threshold of the speaker; performing a comparison operation according to the over-damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to judge the current state of the speaker; when the real-time load value of the speaker is less than or equal to the over-damping critical threshold and greater than or equal to the under-damping critical threshold, judging that the speaker is in a normal sounding state; when the real-time load value of the speaker is greater than the over-damping critical threshold, judging that the speaker is in an over-damping state, performing an over-damping adjustment operation and updating the over-damping critical threshold to obtain a PWM wave; when the real-time load value of the speaker is less than the under-damping critical threshold, the speaker is in an under-damping state, performing an under-damping adjustment operation and updating the under-damping critical threshold to obtain a PWM wave; and adjusting the sounding process of the speaker according to the PWM wave to realize intelligent control of the sounding state of the speaker. In the present invention, by real-time monitoring of the load state of the speaker and intelligent judgment and adjustment based on the critical thresholds of over-damping and under-damping, the distortion problem of the speaker under different load conditions can be effectively avoided, ensuring that the speaker is always in the best sounding state. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of an intelligent control method of a MEMS speaker provided by an embodiment of the present invention;
[0051] Figure 2 It is a schematic diagram of the structure of an intelligent control system of a MEMS speaker provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] Reference Figure 1 The first embodiment of the present invention provides an intelligent control method of a MEMS speaker, comprising the following steps:
[0054] S11, obtaining a real-time load value, an over-damping critical threshold, and an under-damping critical threshold of the loudspeaker;
[0055] S12, performing a comparison operation according to the over-damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker;
[0056] S13, when the real-time load value of the speaker is less than or equal to the over-damping critical threshold and greater than or equal to the under-damping critical threshold, determining that the speaker is in a normal sounding state;
[0057] S14, when the real-time load value of the speaker is greater than the over-damping critical threshold, it is determined that the speaker is in an over-damping state, an over-damping adjustment operation is performed and the over-damping critical threshold is updated to obtain a PWM wave;
[0058] S15, when the real-time load value of the speaker is less than the under-damping critical threshold, the speaker is in an under-damping state, an under-damping adjustment operation is performed and the under-damping critical threshold is updated to obtain a PWM wave;
[0059] S16, adjusting the sound generation process of the speaker according to the PWM wave to achieve intelligent control of the sound generation state of the speaker.
[0060] In step S11, a real-time load value, an over-damping critical threshold, and an under-damping critical threshold of the loudspeaker are obtained.
[0061] Among them, the real-time load value of the speaker is a real-time parameter reflecting the current damping state of the speaker, indicating the size of the load on the speaker, and is used to determine whether the speaker is currently in a normal, over-damped or under-damped state, so as to determine whether the PWM wave parameters need to be adjusted to optimize the sound effect. The over-damped critical threshold is a preset critical value used to determine whether the speaker is in an over-damped state. It is initially determined according to the design parameters of the speaker and adjusted in real time during operation to match the actual working conditions. The under-damped critical threshold is a preset critical value used to determine whether the speaker is in an under-damped state. Similar to the over-damped critical threshold, it is determined by design parameters or experimental data and updated in real time according to the actual working conditions. It is used to compare the real-time load value of the speaker and determine whether the PWM wave parameters need to be adjusted to prevent the sound quality problems caused by the under-damped state. Exemplarily, in an embodiment of the present invention, the over-damped critical threshold is set to 110% of the maximum rated load value, and the under-damped critical threshold is set to 30% of the maximum rated load value. Of course, according to different user needs and actual applications, the over-damped critical threshold and the under-damped critical threshold can also be set to other values, which are not limited by the present invention.
[0062] It should be noted that in step S11, obtaining the real-time load value, over-damping critical threshold and under-damping critical threshold of the loudspeaker is a key prerequisite for the entire control process. The real-time load value of the loudspeaker reflects the current damping state, while the over-damping critical threshold and under-damping critical threshold represent the critical working state of the loudspeaker under different load conditions. The accurate acquisition and calculation of these parameters directly affect the accuracy of subsequent judgment and adjustment. Therefore, when acquiring these parameters, the system should ensure the accuracy of sensors and measuring equipment to ensure that the loudspeaker can be intelligently controlled under optimal conditions.
[0063] Wherein, in step S11, obtaining the real-time load value of the speaker includes:
[0064] Collect the capacitance charge value of the speaker;
[0065] According to the capacitor charge value, an average period of a periodic wave of the capacitor charge value is calculated to obtain a real-time load value of the speaker.
[0066] It is worth noting that the real-time load value of the speaker is a comprehensive reflection of the current working state of the speaker. It is obtained indirectly by monitoring the charge value of the capacitor and analyzing its periodic changes. The real-time load value of the speaker is calculated by collecting the charge value of the speaker capacitor and calculating the average period of the periodic wave of these charge values. The real-time load value of the speaker is used to further judge the sound state of the speaker (normal sound, over-damping or under-damping), and as a basis for adjusting the PWM wave parameters, so as to realize intelligent control of the sound state of the speaker, ensure stable sound quality, reduce distortion and improve the response speed of the system.
[0067] In step S12, a comparison operation is performed based on the over-damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker.
[0068] It should be noted that the current speaker state includes a normal sounding state, an over-damped state, or an under-damped state. Among them, when the speaker is in a normal sounding state, the speaker load value is between two critical values, indicating that the speaker is in a normal working state and no adjustment is required. When the speaker is in an over-damped state, the speaker load value is greater than the over-damped critical threshold, indicating that the speaker load is too large and the PWM wave parameters need to be adjusted to reduce damping. When the speaker is in an under-damped state, the speaker load value is less than the under-damped critical threshold, indicating that the speaker load is too small and the PWM wave parameters need to be adjusted to increase damping. Through this comparison operation, an intelligent judgment of the speaker sounding state can be achieved, thereby optimizing the PWM wave control strategy to ensure that the speaker can work stably under different load conditions and maintain good sound quality performance.
[0069] In step S13, when the real-time load value of the speaker is less than or equal to the over-damping critical threshold and greater than or equal to the under-damping critical threshold, it is determined that the speaker is in a normal sounding state.
[0070] It should be noted that the judgment condition for the speaker to be in a normal sounding state is that the real-time load value of the speaker is between the damping critical threshold and the under-damping critical threshold. This indicates that the load of the speaker is moderate, neither too much damping nor insufficient sound due to too little load.
[0071] In step S14, the over-damping adjustment operation is performed and the over-damping critical threshold is updated to obtain a PWM wave, including:
[0072] According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain an adjusted PWM wave;
[0073] The over-damping critical threshold is recalculated and updated based on the adjusted speaker state and the real-time load value.
[0074] It should be noted that the dynamically adjusted PWM wave controls the change of the high-level duty cycle and frequency according to the real-time load value of the speaker and the preset adjustment coefficient, ensuring that the speaker can adapt to different load conditions. This adjustment coefficient is pre-set according to the physical characteristics and working state of the speaker to ensure that the PWM wave can adapt to the actual needs of the speaker under different load conditions. Exemplarily, in an embodiment of the present invention, the adjustment coefficient is set to 0.1. Of course, according to different user needs and speaker characteristics, the adjustment coefficient can also be set to 0.15, 0.05, etc., and the present invention is not limited to this.
[0075] Among them, the updated damping critical threshold is recalculated based on the adjusted speaker state and real-time load value, and is used for subsequent control operations. The purpose of this process is to control the sound state of the speaker by adjusting the duty cycle and frequency of the PWM wave to adapt to real-time changing load conditions. The adjusted PWM wave can better adapt to the current working state of the speaker and reduce the sound distortion caused by over-damping. At the same time, the recalculated and updated damping critical threshold provides a new benchmark for subsequent speaker state judgment and control operations, ensuring that the system can continuously optimize the performance of the speaker. Through this dynamic adjustment and update mechanism, the speaker system can maintain the best sound state under various working conditions, improving the sound quality and system stability.
[0076] Wherein, based on the adjusted speaker state and the real-time load value, recalculating and updating the over-damping critical threshold value comprises:
[0077] Based on the adjusted real-time load value of the loudspeaker and the preset over-damping correction coefficient, a product operation is performed to obtain a corrected over-damping critical threshold value;
[0078] According to the corrected over-damped critical threshold, smoothing is performed to obtain a smoothed corrected over-damped critical threshold;
[0079] The damping critical threshold is updated to a smoothed corrected over-damping critical threshold for subsequent speaker state determination and control operations.
[0080] It should be noted that the corrected over-damping critical threshold is obtained by multiplying the real-time load value of the speaker by a preset over-damping correction coefficient. The over-damping correction coefficient is pre-set according to the working characteristics of the speaker and is used to adjust the threshold to adapt to the changes of the speaker under different load conditions. Exemplarily, in the embodiment of the present invention, the over-damping correction coefficient is set to 0.95 through multiple experiments and analysis. Of course, according to user needs and speaker characteristics, the over-damping correction coefficient can also be set to 0.9, 0.99, etc., and the present invention is not limited to this. The smoothed corrected over-damping critical threshold is obtained by smoothing the corrected value. Smoothing is performed by mathematically smoothing the corrected over-damping critical threshold to reduce fluctuations and improve stability. Commonly used smoothing methods include moving average or exponential smoothing techniques to ensure that the threshold is updated more smoothly. In the specific implementation process, the smoothing method used is the exponential smoothing method. Of course, other smoothing methods can also be used, and the present invention is also not limited to this. The purpose of this process is to enable the system to adapt to the real-time load changes of the speaker by dynamically adjusting the damping critical threshold. The updated smooth correction over-damping critical threshold will serve as the benchmark for subsequent speaker status judgment and control operations. This dynamic adjustment mechanism can improve the response speed and accuracy of the speaker, ensuring that the speaker can maintain the best sound state under different load conditions, thereby improving sound quality and reducing distortion. In this way, the system can make adaptive adjustments when facing different speaker working conditions, thereby optimizing the performance of the speaker and improving the stability and reliability of the overall system.
[0081] In step S15, when the real-time load value of the speaker is less than the under-damping critical threshold, the speaker is in an under-damping state, an under-damping adjustment operation is performed and the under-damping critical threshold is updated to obtain a PWM wave, including:
[0082] According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain an adjusted PWM wave;
[0083] The underdamping critical threshold is recalculated and updated based on the adjusted speaker state and the real-time load value.
[0084] It should be noted that the real-time load value refers to the load condition of the speaker in actual operation, which is related to the input signal of the speaker, environmental conditions and the characteristics of the speaker itself. The underdamping critical threshold is a preset parameter used to determine whether the speaker is in an underdamping state. When the real-time load value is less than this threshold, the speaker is considered to be in an underdamping state. When the speaker is in an underdamping state, the system will perform a series of adjustment operations to optimize the performance of the speaker. These operations include adjusting the parameters of the PWM wave, such as the high-level duty cycle and frequency. The high-level duty cycle of the PWM wave determines the power output of the signal, while the frequency affects the switching speed of the signal. By dynamically adjusting these two parameters, the output characteristics of the speaker, such as volume and sound quality, can be changed. After the dynamic adjustment, the parameters of the PWM wave (such as duty cycle and frequency) have been optimized according to the real-time load value and the preset adjustment coefficient to adapt to the current state of the speaker. After adjusting the PWM wave and observing the response of the speaker, the system will recalculate and update the underdamping critical threshold according to the new speaker state and the real-time load value. This process helps the system continuously optimize the performance of the speaker to ensure that it can reach the best state under different working conditions.
[0085] The step of dynamically adjusting the high level duty cycle and frequency of the PWM wave according to the real-time load value and the preset adjustment coefficient to obtain the adjusted PWM wave includes:
[0086] Get the real-time load value and speaker status of the current speaker;
[0087] According to the real-time load value and the speaker state, the high-level duty cycle of the PWM wave is calculated and dynamically adjusted to obtain a modified PWM wave duty cycle;
[0088] According to the real-time load value and the preset adjustment coefficient, the frequency of the PWM wave is calculated and dynamically adjusted to obtain a modified PWM wave frequency;
[0089] An adjusted PWM wave signal is generated according to the modified PWM wave duty cycle and the modified PWM wave frequency.
[0090] It should be noted that the high-level duty cycle is an important parameter of the PWM wave, which determines the average power output of the signal. By calculating and adjusting the duty cycle according to the real-time load value and the speaker status, it can be ensured that the speaker can output a stable volume under different load conditions. Dynamic adjustment means that the duty cycle is not fixed, but is adjusted in real time according to real-time data to adapt to the actual working needs of the speaker. The frequency of the PWM wave affects the switching speed of the signal, which in turn affects the sound quality and response speed of the speaker. By calculating and adjusting the frequency according to the real-time load value and the preset adjustment coefficient, the sound characteristics of the speaker can be optimized. Based on the corrected PWM wave duty cycle and frequency, the system will generate a new PWM wave signal, which will be used to drive the speaker to work under the new parameters.
[0091] It is worth noting that this process is a closed-loop control system that ensures that the speaker can achieve optimal performance under different working conditions by real-time monitoring and adjusting the parameters of the PWM wave. This intelligent control method can improve the response speed, sound quality and stability of the speaker, making it better adapted to different application scenarios and user needs. In addition, this dynamic adjustment strategy also helps to extend the service life of the speaker because it can optimize the power output according to the actual load conditions to avoid overload or underload.
[0092] The recalculating and updating the underdamping critical threshold value based on the adjusted speaker state and the real-time load value comprises:
[0093] Based on the adjusted real-time load value of the loudspeaker and the damping critical threshold, recalculating the under-damping critical threshold to obtain a modified under-damping critical threshold;
[0094] According to the under-damping critical threshold, smoothing processing is performed to obtain a smoothed corrected under-damping critical threshold;
[0095] The under-damping critical threshold is updated to the smoothed modified under-damping critical threshold for subsequent speaker state determination and control operations.
[0096] It should be noted that the corrected underdamped critical threshold is recalculated by comparing the real-time load value of the speaker and the adjusted damped critical threshold, combined with a specific calculation formula. The smoothing process is similar to the smoothing process of the corrected overdamped critical threshold. The corrected underdamped critical threshold is processed by a smoothing algorithm to reduce the noise or error that may be generated during the calculation process, thereby obtaining a smoother critical threshold. The purpose of this process is to dynamically update the underdamped critical threshold when the speaker state changes, so as to ensure that the speaker can be accurately identified and properly controlled in the underdamped state. By recalculating and smoothing the underdamped critical threshold, the system can respond more sensitively to the real-time load changes of the speaker and prevent sound distortion or sound quality degradation caused by underdamping. This step improves the response speed and control accuracy of the speaker, allowing the speaker system to maintain efficient performance in various states.
[0097] The recalculating the underdamping critical threshold to obtain the modified underdamping critical threshold includes:
[0098] Get the current over-damping critical threshold and under-damping critical threshold;
[0099] According to the current over-damping critical threshold and the under-damping critical threshold, the under-damping critical threshold is updated to obtain a modified under-damping critical threshold, and the calculation formula is as follows:
[0100] δ = H - γ;
[0101] Among them, δ represents the modified under-damping critical threshold; H represents the current over-damping critical threshold; γ represents a correction parameter, which is a key value used to adjust and optimize the under-damping critical threshold. By gradually reducing the voltage of the input speaker excitation signal, the frequency response of the speaker is gradually increased until the benchmark reference value is reached, thereby determining the correction parameter.
[0102] It should be noted that the corrected underdamped critical threshold is a critical point describing the system in an underdamped state, which is calculated using the above formula and is used to optimize the system's performance, ensuring that the system can achieve the expected response characteristics in an underdamped state, and improving the system's stability and response speed. The current overdamped critical threshold is a parameter that describes the critical point of the overdamped state under the current conditions of the system. The correction parameter is a key value used to adjust and optimize the underdamped critical threshold. The correction parameter is determined by gradually reducing the voltage of the input speaker excitation signal so that the speaker's frequency response gradually increases until the benchmark reference value is reached. The correction parameter is used to adjust the system's underdamped critical threshold to make it more in line with design requirements or actual application needs and optimize the overall performance of the system.
[0103] In step S16, the sound generation process of the speaker is adjusted according to the PWM wave to achieve intelligent control of the sound generation state of the speaker.
[0104] It should be noted that PWM wave (Pulse Width Modulation) is a technology that controls power output by changing the duty cycle of the signal. In speaker control, PWM wave can be used to adjust speaker volume, frequency response, sound quality and other characteristics. The duty cycle of PWM wave refers to the ratio of high level time to one cycle time. By changing the duty cycle, the average power output of the speaker can be controlled, thereby adjusting the volume. The frequency of the PWM wave determines the switching speed of the signal. In speaker control, the choice of frequency affects the sound quality and the response of the speaker. The waveform of the PWM wave is usually a square wave, but it can also be other shapes, such as a sine wave. Different waveforms will affect the sound characteristics of the speaker.
[0105] For example, in a specific implementation, if the system needs to reduce the volume of the speaker, it can be achieved by reducing the duty cycle of the PWM wave; if the tone of the speaker needs to be changed, it can be achieved by adjusting the frequency of the PWM wave. This intelligent control based on PWM waves enables the speaker to flexibly adjust its sound state according to different application scenarios and user needs.
[0106] In order to facilitate the understanding of the present invention, some preferred embodiments of the present invention are further described below.
[0107] In this embodiment, in a smart phone, the MEMS speaker is used as the core sound unit, and the intelligent control method is applied to ensure that the speaker can output high-quality sound at different volumes and audio contents. The intelligent control system monitors the load (damping) state of the speaker in real time, dynamically adjusts the parameters of the PWM wave, prevents the sound quality from deteriorating, and ensures that the speaker can operate stably under different working conditions.
[0108] The working process is as follows:
[0109] Step 1: The smartphone starts the audio playback function, the MEMS speaker starts working, and the real-time load value of the speaker is continuously collected and transmitted to the central processing unit (CPU) through the monitoring system.
[0110] Step 2: The CPU analyzes and compares the real-time load value according to the preset over-damping critical threshold and under-damping critical threshold to determine the current working state of the speaker.
[0111] Step 3: During audio playback, the CPU detects that the real-time load value of the speaker is between the over-damping critical threshold and the under-damping critical threshold, and determines that the speaker is in a normal sounding state. At this time, the PWM wave parameters remain unchanged and the speaker continues to sound normally.
[0112] Step 4: If the real-time load value of the speaker is detected to exceed the critical threshold of over-damping, the CPU determines that the speaker is in an over-damping state, and the sound quality may deteriorate. The CPU generates an adjustment instruction, dynamically adjusts the high-level duty cycle and frequency of the PWM wave, generates a new PWM wave, and optimizes the output state of the speaker.
[0113] Step 5: If the real-time load value of the speaker is lower than the under-damping critical threshold, the CPU determines that the speaker is in an under-damping state, and the system automatically generates an adjustment instruction and updates the under-damping critical threshold to obtain new PWM wave parameters to ensure the stability of the speaker in the under-damping state.
[0114] Step 6: The CPU transmits the adjusted PWM wave signal to the speaker to adjust its sound-generating process and ensure that the sound quality output by the speaker remains optimal under different damping conditions.
[0115] Step 7: If during the adjustment process, it is detected that the state of the speaker continues to be abnormal, the CPU will recalculate and update the damping critical threshold and the under-damping critical threshold, and make more detailed adjustments to prevent further degradation of the sound quality.
[0116] Step 8: After all adjustments are completed, the system recalibrates the working status of the speaker to ensure the accuracy of the load monitoring data and restore the normal audio output process.
[0117] Step 9: During the entire process, the CPU continuously monitors the working status of the speaker to ensure that the speaker can output clear, high-fidelity sound in different audio scenarios.
[0118] Through the above steps, the intelligent control method can ensure that the MEMS speaker can output high-quality sound at different volumes and audio contents, avoiding sound quality problems caused by abnormal damping state.
[0119] In order to send the adjustment instruction to the speaker, two implementation methods are provided below:
[0120] In one implementation, the system in step 5 automatically generates an adjustment instruction and updates the underdamped critical threshold to obtain new PWM wave parameters to ensure the stability of the speaker in the underdamped state, including:
[0121] When an abnormal load state of the speaker is detected, the CPU generates an adjustment instruction including updated PWM wave parameters;
[0122] The CPU wirelessly transmits the generated adjustment instruction to the control module of the speaker through the wireless communication module;
[0123] The control module of the speaker receives the adjustment instruction and adjusts the high-level duty cycle and frequency of the PWM wave according to the instruction to correct the sound state of the speaker;
[0124] The speaker produces sound according to the adjusted PWM wave signal to ensure optimized sound quality.
[0125] In this implementation, the communication module of the server has established a wireless communication connection with the speaker in advance. Once the server detects that the speaker is in an abnormal state, it will immediately send an adjustment instruction to the speaker via the wireless network. This method is suitable for mobile devices or other scenarios that require wireless control, ensuring that the speaker can receive the adjustment instruction in time and make adaptive adjustments.
[0126] Among them, wireless communication refers to the technology of transmitting information through electromagnetic waves without physical connection. Wireless communication uses electromagnetic waves (such as radio frequency, microwave, infrared, etc.) to transmit data in the air, and is widely used in data transmission and communication between various devices, especially in situations where wired connection is not suitable or cannot be used. Common wireless communication technologies include Bluetooth communication technology, WIFI communication technology, Zigbee communication technology and 5G communication technology. For example, the 5G communication technology of wireless communication technology used in this embodiment, of course, according to different user needs and application scenarios, other wireless communication technologies can also be used, and the present invention does not limit this.
[0127] In another embodiment, the system in step 5 automatically generates an adjustment instruction and updates the underdamped critical threshold to obtain new PWM wave parameters to ensure the stability of the speaker in the underdamped state, including:
[0128] After the CPU detects that the load state of the speaker is abnormal, it generates an adjustment instruction including updated PWM wave parameters;
[0129] The generated adjustment instruction is directly sent to the speaker control chip through the wired communication module;
[0130] The speaker control chip receives the adjustment command and adjusts the high-level duty cycle and frequency of the PWM wave according to the command to correct the sound state of the speaker;
[0131] The speaker produces sound according to the adjusted PWM wave signal to ensure that the sound quality meets the expected standard.
[0132] In this implementation, the communication module of the server has established a wired communication connection with the speaker in advance. Once the server detects that the speaker is in an abnormal state, it will immediately send an adjustment instruction to the speaker through a wired channel. This method is suitable for fixed devices or scenarios with high real-time requirements. It can complete the transmission and execution of instructions more quickly, ensuring the stability and sound quality of the speaker.
[0133] It should be noted that wired communication refers to the technology of transmitting information through physical connection media (such as cables and optical fibers). Wired communication relies on physical media such as wires or optical fibers to transmit data between different devices. It is widely used in situations where stable and high-speed data transmission is required, especially in environments with high requirements for anti-interference. Common wired communication technologies include Ethernet communication technology, optical fiber communication technology, USB communication technology, and HDMI communication technology. Exemplarily, the wired communication technology used in this embodiment is optical fiber communication technology. Of course, other wired communication technologies can also be used according to different user needs and application scenarios, and the present invention is not limited to this.
[0134] In summary, the present invention provides an intelligent control method for a MEMS speaker, comprising: obtaining a real-time load value, an over-damping critical threshold and an under-damping critical threshold of the speaker; performing a comparison operation according to the over-damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker; when the real-time load value of the speaker is less than or equal to the over-damping critical threshold and greater than or equal to the under-damping critical threshold, determining that the speaker is in a normal sounding state; when the real-time load value of the speaker is greater than the over-damping critical threshold, determining that the speaker is in an over-damping state, performing an over-damping adjustment operation and updating the over-damping critical threshold to obtain a PWM wave; when the real-time load value of the speaker is less than the under-damping critical threshold, the speaker is in an under-damping state, performing an under-damping adjustment operation and updating the under-damping critical threshold to obtain a PWM wave; according to the PWM wave, adjusting the sounding process of the speaker to achieve intelligent control of the sounding state of the speaker. In the present invention, by real-time monitoring of the load state of the speaker and intelligent judgment and adjustment based on the critical thresholds of over-damping and under-damping, the distortion problem of the speaker under different load conditions can be effectively avoided, ensuring that the speaker is always in the best sounding state.
[0135] Reference Figure 2 The second embodiment of the present invention provides an intelligent control system of a MEMS speaker, comprising:
[0136] A data acquisition module, used to obtain a real-time load value, a damping critical threshold and an under-damping critical threshold of a loudspeaker;
[0137] A state determination module, used for performing a comparison operation according to the damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker;
[0138] A normal processing module, configured to, when the real-time load value of the speaker is less than or equal to the damping critical threshold and greater than or equal to the under-damping critical threshold, the speaker is in a normal sounding state;
[0139] An over-damping processing module, used for, when the real-time load value of the speaker is greater than the critical damping threshold, the speaker is in an over-damping state, performing an over-damping adjustment operation and updating the critical damping threshold to obtain a PWM wave;
[0140] An underdamping processing module, used for, when the real-time load value of the speaker is less than the underdamping critical threshold, the speaker is in an underdamping state, performing an underdamping adjustment operation and updating the underdamping critical threshold to obtain a PWM wave;
[0141] The intelligent control module is used to adjust the sound generation process of the loudspeaker according to the PWM wave so as to enable the loudspeaker to be intelligently controlled.
[0142] It should be noted that the intelligent control system of a MEMS speaker provided in an embodiment of the present invention is used to execute all the process steps of the intelligent control method of a MEMS speaker in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated.
[0143] The embodiment of the present invention further provides a terminal device. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an intelligent control program for a MEMS speaker. When the processor executes the computer program, the steps in the above-mentioned embodiments of the intelligent control method for a MEMS speaker are implemented, such as Figure 1 Alternatively, the processor implements the functions of each module / unit in the above-mentioned system embodiments when executing the computer program.
[0144] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.
[0145] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of terminal devices and do not constitute a limitation on the terminal device. The terminal device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0146] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0147] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0148] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0149] It should be noted that the system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0150] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. An intelligent control method for a MEMS speaker, characterized in that: Executed by the controller, including: Obtain the real-time load value, over-damping critical threshold and under-damping critical threshold of the loudspeaker; Performing a comparison operation according to the over-damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker; When the real-time load value of the loudspeaker is less than or equal to the over-damping critical threshold and greater than or equal to the under-damping critical threshold, it is determined that the loudspeaker is in a normal sounding state; When the real-time load value of the speaker is greater than the over-damping critical threshold, the speaker is determined to be in an over-damping state, an over-damping adjustment operation is performed and the over-damping critical threshold is updated to obtain a PWM wave; When the real-time load value of the speaker is less than the under-damping critical threshold, the speaker is in an under-damping state, an under-damping adjustment operation is performed and the under-damping critical threshold is updated to obtain a PWM wave; According to the PWM wave, the sound generation process of the speaker is adjusted to realize intelligent control of the sound generation state of the speaker; The performing of the over-damping adjustment operation and updating the over-damping critical threshold to obtain a PWM wave includes: According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain an adjusted PWM wave; Recalculating and updating the over-damping critical threshold value based on the adjusted speaker state and the real-time load value; Wherein, based on the adjusted speaker state and the real-time load value, recalculating and updating the over-damping critical threshold value comprises: Based on the adjusted real-time load value of the loudspeaker and a preset over-damping correction coefficient, a product operation is performed to obtain a corrected over-damping critical threshold value; According to the corrected over-damped critical threshold, smoothing is performed to obtain a smoothed corrected over-damped critical threshold; Updating the damping critical threshold to a smoothed corrected over-damping critical threshold for subsequent speaker state determination and control operations; The speaker is in an underdamped state, and an underdamped adjustment operation is performed and the underdamped critical threshold is updated to obtain a PWM wave, including: According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain an adjusted PWM wave; recalculating and updating the underdamping critical threshold value based on the adjusted speaker state and the real-time load value; According to the real-time load value and the preset adjustment coefficient, the high-level duty cycle and frequency of the PWM wave are dynamically adjusted to obtain the adjusted PWM wave, including: Get the real-time load value and speaker status of the current speaker; According to the real-time load value and the speaker state, the high-level duty cycle of the PWM wave is calculated and dynamically adjusted to obtain a modified PWM wave duty cycle; According to the real-time load value and the preset adjustment coefficient, the frequency of the PWM wave is calculated and dynamically adjusted to obtain a modified PWM wave frequency; generating an adjusted PWM wave signal according to the modified PWM wave duty cycle and the modified PWM wave frequency; The step of recalculating and updating the underdamping critical threshold based on the adjusted speaker state and the real-time load value includes: Recalculating the under-damping critical threshold based on the adjusted real-time load value of the loudspeaker and the damping critical threshold to obtain a modified under-damping critical threshold; According to the under-damping critical threshold, smoothing processing is performed to obtain a smoothed corrected under-damping critical threshold; The under-damping critical threshold is updated to the smoothed modified under-damping critical threshold for subsequent speaker state determination and control operations.
2. The intelligent control method of the MEMS speaker according to claim 1, characterized in that: The step of obtaining the real-time load value of the speaker includes: Collect the capacitance charge value of the speaker; According to the capacitor charge value, an average period of a periodic wave of the capacitor charge value is calculated to obtain a real-time load value of the speaker.
3. The intelligent control method of the MEMS speaker according to claim 1, characterized in that: The recalculating the underdamping critical threshold to obtain a modified underdamping critical threshold includes: Get the current over-damping critical threshold and under-damping critical threshold; According to the current over-damping critical threshold and the under-damping critical threshold, the under-damping critical threshold is updated to obtain a modified under-damping critical threshold, and the calculation formula is as follows: δ = H - γ; Among them, δ represents the modified under-damping critical threshold; H represents the current over-damping critical threshold; γ represents a correction parameter, which is a key value used to adjust and optimize the under-damping critical threshold. By gradually reducing the voltage of the input speaker excitation signal, the frequency response of the speaker is gradually increased until the benchmark reference value is reached, thereby determining the correction parameter.
4. An intelligent control system of a MEMS speaker, used to implement the intelligent control method of a MEMS speaker as claimed in any one of claims 1 to 3, characterized in that: include: A data acquisition module, used to obtain a real-time load value, a damping critical threshold and an under-damping critical threshold of a loudspeaker; A state determination module, used for performing a comparison operation according to the damping critical threshold, the under-damping critical threshold and the real-time load value of the speaker to determine the current state of the speaker; A normal processing module, configured to, when the real-time load value of the speaker is less than or equal to the damping critical threshold and greater than or equal to the under-damping critical threshold, the speaker is in a normal sounding state; An over-damping processing module, used for, when the real-time load value of the speaker is greater than the critical damping threshold, the speaker is in an over-damping state, performing an over-damping adjustment operation and updating the critical damping threshold to obtain a PWM wave; An underdamping processing module, used for, when the real-time load value of the speaker is less than the underdamping critical threshold, the speaker is in an underdamping state, performing an underdamping adjustment operation and updating the underdamping critical threshold to obtain a PWM wave; The intelligent control module is used to adjust the sound generation process of the loudspeaker according to the PWM wave so as to enable the loudspeaker to be intelligently controlled.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the intelligent control method of the MEMS speaker according to any one of claims 1 to 3.
Citation Information
Patent Citations
Adaptive loudspeaker adjusting system and method
CN108419173A
Loudspeaker load diagnosis method, system, equipment and medium
CN117750288A