Loudspeaker control method, device and storage medium
By determining the protection model based on the speaker type information, obtaining the current operating parameters and adjusting the input signal, the damage problem caused by inaccurate speaker type identification is solved, and safe and reliable speaker control is achieved.
Patent Information
- Application Number
- CN202111300890.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-11-04
AI Technical Summary
In the prior art, since the speaker type identification method is too limited, the input signal adjustment does not meet the speaker hardware standards, which may cause damage to components.
By determining a protection model based on the type information of the speaker, obtaining the current operating parameters, and adjusting the input signal based on the actual operating parameters, it is ensured that the speaker operates within a safe range.
This enables precise control of the speaker input signal, reduces the risk of damage, reduces R&D and production costs, and improves safety and stability.
Smart Images

Figure CN116074424B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, and storage medium for controlling a speaker. Background Art
[0002] Currently, mobile phone audio output is limited by the size of the speaker, resulting in a need to maximize speaker volume. The primary approach is to use an intelligent amplifier, which monitors the speaker's operating amplitude and temperature in real time, thereby increasing the voltage and volume as much as possible while ensuring proper operation. However, increasing the volume using this method can cause the speaker's operating amplitude and temperature to exceed limits, potentially damaging the speaker's components.
[0003] In the related art, since the factory-set speaker type identification method is too limited, when the input signal is adjusted during use, the adjusted input signal does not meet the hardware standards of the speaker itself, causing damage to the speaker components. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a control method, device and storage medium for a speaker.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for controlling a speaker is provided, which is applied to an electronic device having a speaker, comprising:
[0006] In the process of the speaker outputting the sound signal, determining, according to the type information of the speaker, a protection model corresponding to the type information;
[0007] determining, according to the protection model, current actual operating parameters of the speaker;
[0008] The input signal of the speaker is adjusted according to the actual operating parameters.
[0009] In some embodiments, the method further comprises:
[0010] Obtaining current electrical performance parameters of the speaker;
[0011] Determining the type information of the speaker based on the current electrical performance parameter and a preset association relationship;
[0012] The association relationship is used to characterize the mapping relationship between the electrical performance parameters and the type information.
[0013] In some embodiments, the method further comprises:
[0014] In the process of configuring parameters of the speaker, obtaining electrical performance parameters of the speaker;
[0015] Configuring type information corresponding to the electrical performance parameters;
[0016] Establishing an association relationship between the electrical performance parameter and the type information;
[0017] The electrical performance parameter, the type information, and the association relationship are stored in a memory of the electronic device.
[0018] In some embodiments, the method further comprises:
[0019] During parameter configuration of the speaker, obtaining at least one of a winding direction of a coil in the speaker, a magnetization direction of a magnetic module, and a positive and negative polarity direction of an input signal;
[0020] Adjusting the electrical performance parameter according to at least one of the winding direction, the magnetization direction, and the positive and negative polarity directions;
[0021] Configuring type information corresponding to the adjusted electrical performance parameters;
[0022] The adjusted electrical performance parameters are different, and the type information corresponding to each of the adjusted electrical performance parameters is also different.
[0023] In some embodiments, the electrical performance parameters include: phase response;
[0024] The type information corresponding to the configuration and the electrical performance parameter includes:
[0025] During the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker;
[0026] Type information corresponding to the phase response is configured.
[0027] In some embodiments, during the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker includes:
[0028] In the process of the speaker outputting the test sound signal, identifying the frequency type of the test sound signal output by the speaker;
[0029] The phase response is obtained according to the test operation parameters using a calculation strategy corresponding to the frequency type; wherein different frequency types correspond to different calculation strategies.
[0030] In some embodiments, the frequency type includes: a fixed frequency and a non-fixed frequency; and obtaining the phase response according to the test operation parameters using a calculation strategy corresponding to the frequency type includes:
[0031] In the process of the speaker outputting the test sound signal having the fixed frequency, using a first calculation strategy to obtain the phase response according to the test operation parameters;
[0032] In the process of the speaker outputting the test sound signal having the non-fixed frequency, using a second calculation strategy to obtain the phase response according to the test operation parameters;
[0033] The first calculation strategy is different from the second calculation strategy.
[0034] In some embodiments, the test operation parameters include: a first voltage signal, a first current signal, and a first sampling rate;
[0035] The obtaining the phase response according to the test operation parameters using the first calculation strategy includes:
[0036] determining a start time of a voltage input period of the first voltage signal and a start time of a current input period of the first current signal;
[0037] A phase response of the speaker is determined according to the fixed frequency, a start time of the voltage input period, a start time of the current input period, and the first sampling rate.
[0038] In some embodiments, determining the phase response of the speaker according to the fixed frequency, the start time of the voltage input cycle, the start time of the current input cycle, and the first sampling rate includes:
[0039] Determining a time difference between a start time of the voltage input period and a start time of the current input period;
[0040] A phase response corresponding to the fixed frequency is determined according to the time difference, the fixed frequency, and the first sampling rate.
[0041] In some embodiments, the test operation parameters include: a second voltage signal, a second current signal, and a second sampling rate;
[0042] The obtaining the phase response according to the test operation parameters by using the second calculation strategy includes:
[0043] Obtaining a voltage data sequence corresponding to the second voltage signal and a current data sequence corresponding to the second current signal; wherein the voltage data sequence and the current data sequence both have a preset length;
[0044] Obtaining a target phase response sequence according to the voltage data sequence and the current data sequence;
[0045] Determining a target frequency according to the preset length and the second sampling rate;
[0046] From the sequence of phase responses, a phase response corresponding to the target frequency is determined.
[0047] In some embodiments, obtaining a target phase response sequence according to the voltage data sequence and the current data sequence includes:
[0048] Obtaining a phase angle sequence of the second voltage signal according to the voltage data sequence;
[0049] Obtaining a phase angle sequence of the second current signal according to the current data sequence;
[0050] The target phase response sequence is determined according to a difference between the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal at corresponding positions.
[0051] In some embodiments, determining the actual current operating parameters of the speaker according to the protection model includes:
[0052] Inputting the current voltage signal and current signal of the speaker into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal;
[0053] The adjusting the input signal of the speaker according to the actual operating parameter includes:
[0054] When the temperature is greater than a temperature threshold, reducing the voltage signal input to the speaker; and / or
[0055] When the amplitude is greater than an amplitude threshold, the current signal input to the speaker is reduced.
[0056] According to a second aspect of an embodiment of the present disclosure, a speaker control device is provided, which is applied to an electronic device having a speaker, including:
[0057] a first determining module configured to determine, in a process in which the speaker outputs a sound signal, according to the type information of the speaker, a protection model corresponding to the type information;
[0058] a second determining module configured to determine actual current operating parameters of the speaker according to the protection model;
[0059] The third determining module is configured to adjust the input signal of the speaker according to the actual operating parameters.
[0060] In some embodiments, the apparatus further comprises:
[0061] a first acquisition module configured to acquire current electrical performance parameters of the speaker;
[0062] an association module configured to determine the type information of the speaker based on the current electrical performance parameter and a preset association relationship;
[0063] The association relationship is used to characterize the mapping relationship between the electrical performance parameters and the type information.
[0064] In some embodiments, the apparatus further comprises:
[0065] a second acquisition module configured to acquire electrical performance parameters of the speaker during parameter configuration of the speaker;
[0066] A first configuration module is configured to configure type information corresponding to the electrical performance parameter;
[0067] An establishing module configured to establish an association relationship between the electrical performance parameter and the type information;
[0068] A storage module is configured to store the electrical performance parameters, the type information, and the association relationship in a memory of the electronic device.
[0069] In some embodiments, the apparatus further comprises:
[0070] a third acquisition module configured to acquire at least one of a winding direction of a coil in the speaker, a magnetization direction of a magnetic module, and a positive and negative polarity direction of an input signal during parameter configuration of the speaker;
[0071] an adjustment module configured to adjust the electrical performance parameter according to at least one of the winding direction, the magnetization direction, and the positive and negative polarity directions;
[0072] A second configuration module is configured to configure type information corresponding to the adjusted electrical performance parameters;
[0073] The adjusted electrical performance parameters are different, and the type information corresponding to each of the adjusted electrical performance parameters is also different.
[0074] In some embodiments, the electrical performance parameters include: phase response;
[0075] The first configuration module is configured as follows:
[0076] During the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker;
[0077] Type information corresponding to the phase response is configured.
[0078] In some embodiments, the first configuration module is configured to:
[0079] In the process of the speaker outputting the test sound signal, identifying the frequency type of the test sound signal output by the speaker;
[0080] The phase response is obtained according to the test operation parameters using a calculation strategy corresponding to the frequency type; wherein different frequency types correspond to different calculation strategies.
[0081] In some embodiments, the frequency type includes: fixed frequency and non-fixed frequency; the first configuration module is configured to:
[0082] In the process of the speaker outputting the test sound signal having the fixed frequency, using a first calculation strategy to obtain the phase response according to the test operation parameters;
[0083] In the process of the speaker outputting the test sound signal having the non-fixed frequency, using a second calculation strategy to obtain the phase response according to the test operation parameters;
[0084] The first calculation strategy is different from the second calculation strategy.
[0085] In some embodiments, the test operation parameters include: a first voltage signal, a first current signal, and a first sampling rate;
[0086] The first configuration module is configured as follows:
[0087] determining a start time of a voltage input period of the first voltage signal and a start time of a current input period of the first current signal;
[0088] A phase response of the speaker is determined according to the fixed frequency, a start time of the voltage input period, a start time of the current input period, and the first sampling rate.
[0089] In some embodiments, the first configuration module is configured to:
[0090] Determining a time difference between a start time of the voltage input period and a start time of the current input period;
[0091] A phase response corresponding to the fixed frequency is determined according to the time difference, the fixed frequency, and the first sampling rate.
[0092] In some embodiments, the test operation parameters include: a second voltage signal, a second current signal, and a second sampling rate;
[0093] The first configuration module is configured as follows:
[0094] Obtaining a voltage data sequence corresponding to the second voltage signal and a current data sequence corresponding to the second current signal; wherein the voltage data sequence and the current data sequence both have a preset length;
[0095] Obtaining a target phase response sequence according to the voltage data sequence and the current data sequence;
[0096] Determining a target frequency according to the preset length and the second sampling rate;
[0097] From the sequence of phase responses, a phase response corresponding to the target frequency is determined.
[0098] In some embodiments, the first configuration module is configured to:
[0099] Obtaining a phase angle sequence of the second voltage signal according to the voltage data sequence;
[0100] Obtaining a phase angle sequence of the second current signal according to the current data sequence;
[0101] The target phase response sequence is determined according to a difference between the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal at corresponding positions.
[0102] In some embodiments, the second determining module is configured to:
[0103] Inputting the current voltage signal and current signal of the speaker into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal;
[0104] The third determining module is configured to:
[0105] When the temperature is greater than a temperature threshold, reducing the voltage signal input to the speaker; and / or
[0106] When the amplitude is greater than an amplitude threshold, the current signal input to the speaker is reduced.
[0107] According to a third aspect of an embodiment of the present disclosure, a control device for a speaker is provided, comprising:
[0108] processor;
[0109] a memory configured to store processor-executable instructions;
[0110] The processor is configured to implement the steps of any one of the speaker control methods in the first aspect when executed.
[0111] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, which, when the instructions in the storage medium are executed by a processor of a speaker control device, enables the device to perform the steps in any one of the speaker control methods in the above-mentioned first aspect.
[0112] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0113] In the embodiment of the present disclosure, during the process of the speaker outputting a sound signal, the corresponding protection model is determined by the type information of the speaker, and the current actual operating parameters of the speaker are determined according to the protection model, and the input signal of the speaker is adjusted according to the actual operating parameters.
[0114] First, by associating the type information of the speaker with the protection model, the actual operating parameters determined based on the protection model can be more consistent with the performance of the speaker, thereby accurately controlling the input signal of the speaker and reducing the possibility of damage to the speaker due to the input signal exceeding the limit; second, the hardware of the electronic device itself can be used to accurately adjust the input signal without modifying the circuit or structure of the electronic device, which can also reduce R&D and production costs; third, the software-based method to identify the type of speaker is safer and more stable than improving the hardware to identify the type of speaker.
[0115] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0116] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0117] Figure 1 The figure is a flowchart of a method for controlling a speaker according to an exemplary embodiment of the present disclosure.
[0118] Figure 2The figure is a flowchart of a method for controlling a speaker according to an exemplary embodiment of the present disclosure.
[0119] Figure 3 The figure is a block diagram of a speaker control device according to an exemplary embodiment of the present disclosure.
[0120] Figure 4 The figure is a hardware structure block diagram of a speaker control device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0121] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0122] Figure 1 FIG. 1 is a flow chart of a method for controlling a speaker according to an exemplary embodiment. Figure 1 As shown, the method is applied to an electronic device having a speaker, and mainly includes the following steps:
[0123] In step 101, during the process of the speaker outputting a sound signal, a protection model corresponding to the type information is determined according to the type information of the speaker;
[0124] In step 102, the actual operating parameters of the speaker are determined according to the protection model;
[0125] In step 103, the input signal of the speaker is adjusted according to the actual operating parameters.
[0126] Here, electronic devices may include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals may include mobile phones, tablet computers, laptop computers, wearable devices, and other devices. They may also include smart home devices such as smart speakers. Fixed terminals may include desktop computers or smart TVs.
[0127] In the disclosed embodiment, the speaker may refer to a transducer device that converts an electrical signal into an acoustic signal. The performance of the speaker has a great influence on the sound quality played by the electronic device. The input signal in the speaker can make the paper cone or diaphragm in the speaker vibrate and resonate (resonate) with the surrounding air to produce sound through electromagnetic, piezoelectric or electrostatic effects. The protection model may refer to a preset network model (such as a neural network model), or may be called an acoustic model or a speaker parameter model. During the implementation process, information such as the electrical signals at both ends of the speaker may be input into the preset network model, and the actual operating parameters of the speaker (such as the current amplitude and temperature of the speaker) may be output through the preset network model. In the prior art, an electronic device can monitor the condition of the speaker by using the speaker to output a sound signal, calculate the operating parameters of the speaker such as the temperature and amplitude through the protection model, and control the input current of the speaker according to the operating parameters of the speaker to avoid undesirable phenomena such as noise or burning of the speaker.
[0128] In some embodiments, the type information of the speaker is used to characterize the type of the speaker. During the implementation process, the speakers can be classified according to manufacturers with different designs, for example: manufacturer A corresponds to the first type of speaker, manufacturer B corresponds to the second type of speaker, or manufacturer C corresponds to the third type of speaker, etc. Or the speakers can be classified according to different working principles, for example: electric (i.e., dynamic) speakers, electrostatic (i.e., capacitive) speakers, electromagnetic (i.e., reed) speakers, piezoelectric (i.e., crystal) speakers, etc. Or the speakers can be classified according to different operating frequencies, for example: bass speakers, mid-range speakers, or tweeters, etc. Or the speakers can be classified according to different version models, for example: 1.0 type speakers, 2.0 type speakers, or 3.0 type speakers, etc. The present disclosure does not specifically limit the types of speakers, and can be customized according to user needs.
[0129] The operating parameters of the speaker may include: the value of the electrical signal at both ends of the speaker, the volume of the speaker, the amplitude of the speaker, the phase response, the current temperature of the speaker and other parameters or information. The input signal of the speaker may refer to the input current or input voltage of the speaker and other signals, which are not specifically limited in this disclosure. In the embodiment of the present disclosure, the protection model is not unique. Different protection models can be set for different types of speakers. The input parameters and output parameters of the protection models corresponding to different speaker types can also be different. The number and types of operating parameters, input signals, etc. corresponding to different types of speakers can also be different. The electronic device can train the model parameters of the protection model through the detected historical input signals and historical operating parameters, and directly call the trained protection model during actual use.
[0130] In some embodiments, multiple protection models can be obtained through training based on different types of speakers, and the multiple protection models can be stored in an electronic device. During use, the corresponding protection model can be determined from the multiple protection models based on the type information of the speaker.
[0131] In an embodiment of the present disclosure, during the process of the speaker outputting a sound signal, that is, during the normal operation of the speaker by the electronic device, the electronic device may first determine the protection model corresponding to the type information of the speaker based on the type information of the speaker. The electronic device may pre-set a mapping relationship between the speaker type and the protection model, for example: a speaker from manufacturer A corresponds to protection model a, a speaker from manufacturer B corresponds to protection model b, a speaker from manufacturer C corresponds to protection model c, etc. The electronic device may determine the speaker type by detecting the impedance value of an identification resistor within the speaker cavity, for example: a speaker from manufacturer A corresponds to an impedance value of 2 ohms, a speaker from manufacturer B corresponds to an impedance value of 4 ohms, a speaker from manufacturer C corresponds to an impedance value of 6 ohms, etc. Alternatively, the electronic device may determine different speaker types by detecting the level signals corresponding to different pins based on the different short-circuiting methods of the pins set on the speaker, for example: a detected level signal a corresponds to a speaker from manufacturer A, a level signal b corresponds to a speaker from manufacturer B, a level signal c corresponds to a speaker from manufacturer C, etc. Alternatively, the electronic device may determine the speaker type by directly reading the control chip in the speaker module, etc. The present disclosure does not specifically limit the method for determining the speaker type information.
[0132] After the electronic device determines the protection model corresponding to the type information, it can determine the current actual operating parameters of the speaker based on the protection model. For example: the electronic device can obtain the value of the current electrical signal at both ends of the speaker, and then input the value of the current electrical signal into the protection model corresponding to the type information to obtain the current actual operating parameters of the speaker, etc. For example: the electronic device determines that the voltage at both ends of the speaker is 5 volts (V), the current input to the speaker is 2 amperes (A), and inputs it into a protection model to obtain the current temperature of the speaker is 26 degrees, etc. The electronic device determines the actual operating parameters through the protection model, and then adjusts the input signal of the speaker through the actual operating parameters, thereby increasing the voltage and volume as much as possible while ensuring the normal operation of the speaker.
[0133] After the electronic device determines the current actual operating parameters of the speaker, it can adjust the input signal of the speaker according to the actual operating parameters. In some embodiments, the electronic device can pre-set the mapping relationship between the actual operating parameters and the input signal. During the implementation process, the input signal corresponding to the actual operating parameter can be determined based on the actual operating parameter and the mapping relationship. For example: when the temperature in the actual operating parameter is 16-20 degrees, the input voltage in the corresponding input signal can be 6V, when the temperature in the actual operating parameter is 21-25 degrees, the input voltage in the corresponding input signal can be 7V, when the temperature in the actual operating parameter is 26-30 degrees, the input voltage in the corresponding input signal can be 8V, etc. Then if the electronic device determines that the current actual operating parameter temperature is 23 degrees, the input voltage at both ends of the speaker can be adjusted to 7v, etc.
[0134] The electronic device may also pre-set a mapping relationship between the actual operating parameters of the device and the adjustment value of the input signal. During the implementation process, the adjustment value of the input signal corresponding to the actual operating parameter may be determined based on the actual operating parameter and the mapping relationship. For example, when the temperature in the actual operating parameter is 16-20 degrees, the corresponding input voltage adjustment value may be 1V; when the temperature in the actual operating parameter is 21-25 degrees, the corresponding input voltage adjustment value may be 2V; when the temperature in the actual operating parameter is 26-30 degrees, the corresponding input voltage adjustment value may be -1V, etc. Then, if the electronic device determines that the current actual operating parameter temperature is 27 degrees, the input voltage across the speaker may be reduced by 1V, etc.
[0135] In the embodiment of the present disclosure, during the process of the speaker outputting a sound signal, the corresponding protection model is determined by the type information of the speaker, thereby determining the current actual operating parameters of the speaker based on the protection model, and adjusting the input signal of the speaker based on the actual operating parameters. On the one hand, by associating the type information of the speaker with the protection model, the actual operating parameters determined based on the protection model can be made more consistent with the performance of the speaker, thereby accurately controlling the input signal of the speaker and reducing the possibility of damage to the speaker due to the input signal exceeding the limit; on the other hand, the hardware of the electronic device itself can be used to accurately adjust the input signal without modifying the circuit or structure of the electronic device, and it can also reduce R&D and production costs; on the other hand, the software-based method for identifying the type of speaker is more secure and stable than improving the hardware to identify the type of speaker.
[0136] Figure 2 FIG. 1 is a flow chart of a method for controlling a speaker according to an exemplary embodiment. Figure 2 As shown, the method is applied to an electronic device having a speaker, and mainly includes the following steps:
[0137] In step 201, current electrical performance parameters of the speaker are obtained;
[0138] In step 202, the type information of the speaker is determined based on the current electrical performance parameter and a preset association relationship;
[0139] In step 203, during the process of the speaker outputting the sound signal, a protection model corresponding to the type information is determined according to the type information of the speaker;
[0140] In step 204, the actual operating parameters of the speaker are determined according to the protection model;
[0141] In step 205, adjusting the input signal of the speaker according to the actual operating parameters;
[0142] The association relationship is used to characterize the mapping relationship between the electrical performance parameters and the type information.
[0143] In the embodiment of the present disclosure, the electrical performance parameters may include: the electrical signal value at both ends of the speaker during operation, the volume of the speaker, the power of the speaker, the amplitude of the speaker, the phase response and other parameters, which are not specifically limited in the present disclosure. The electronic device can obtain the current electrical performance parameters of the speaker, and then determine the type information of the speaker based on the current electrical performance parameters and the preset association relationship. The association relationship is used to characterize the mapping relationship between the electrical performance parameters and the type information. For example, the type information of the speaker corresponding to the electrical performance parameter d is manufacturer D, the type information of the speaker corresponding to the electrical performance parameter e is manufacturer E, the type information of the speaker corresponding to the electrical performance parameter f is manufacturer F, etc. For example: the electronic device determines that the current voltage at both ends of the speaker is 7V through a preset detection voltage circuit, and according to the current electrical performance parameters and the preset association relationship, it determines that the type information of the speaker can be manufacturer B, etc.
[0144] In some embodiments, the electrical performance parameters of speakers in electronic devices manufactured by different manufacturers may also vary. This disclosure distinguishes speakers from different manufacturers by using different designs to create differences in their electrical performance parameters. This difference is then identified by measuring the current electrical performance parameters of the speakers, thereby enabling intelligent speaker identification without changing the hardware structure.
[0145] In the embodiment of the present disclosure, the type information of the speaker can be determined based on the current electrical performance parameters and the preset correlation relationship, which simply and effectively improves the efficiency and accuracy of determining the type information, thereby enabling the input parameters of the speaker to be adjusted in a timely and accurate manner, thereby improving the operating efficiency of the electronic device, etc.
[0146] In some embodiments, the method further comprises:
[0147] In the process of configuring parameters of the speaker, obtaining electrical performance parameters of the speaker;
[0148] Configuring type information corresponding to the electrical performance parameters;
[0149] Establishing an association relationship between the electrical performance parameter and the type information;
[0150] The electrical performance parameter, the type information, and the association relationship are stored in a memory of the electronic device.
[0151] In an embodiment of the present disclosure, during the production and design process of a speaker, in order to meet different requirements, the speaker needs to be parameterized. Parameter configuration may include: the winding direction configuration of the speaker coil, the magnetization direction configuration of the magnetic module, or the positive and negative polarity configuration of the input signal, as well as the configuration of parameters such as the speaker electrical signal configuration, the speaker amplitude configuration, and the speaker phase response configuration, which are not specifically limited in this disclosure. During the process of parameter configuration of the speaker, the electronic device may obtain the electrical performance parameters of the speaker, then configure type information corresponding to the electrical performance parameters, and establish an association between the electrical performance parameters and the type information. For example, the electronic device may set the type information corresponding to amplitude a to manufacturer A, the type information corresponding to amplitude b to manufacturer B, and the type information corresponding to amplitude c to manufacturer C, etc. Alternatively, the electronic device may set the type information corresponding to electrical performance parameter a to manufacturer A, the type information corresponding to electrical performance parameter b to manufacturer B, and the type information corresponding to electrical performance parameter c to manufacturer C, etc. The electronic device may store the electrical performance parameters, the type information, and the association in a memory of the electronic device. Then, when the electronic device actually uses the speaker, it can first obtain the current electrical performance parameters of the speaker, and then directly read the stored information from the memory to determine the type information of the speaker corresponding to the current electrical performance parameters.
[0152] For example, the current electrical performance parameter may be compared with the backup electrical performance parameter pre-stored in the memory, and the type information corresponding to the backup electrical performance parameter that satisfies the association relationship may be determined as the type information corresponding to the current electrical performance parameter.
[0153] In an embodiment of the present disclosure, during the process of configuring parameters of the speaker, the electrical performance parameters of the speaker are obtained, type information corresponding to the electrical performance parameters is configured, an association relationship between the electrical performance parameters and the type information is established, and the electrical performance parameters, the type information and the association relationship are stored in the memory of the electronic device. In this way, when it is necessary to determine the type information corresponding to the current performance parameters, it is only necessary to compare the current electrical performance parameters with the backup electrical performance parameters in the memory, which helps to improve the efficiency of the electronic device in determining the speaker type information during actual use.
[0154] In some embodiments, the method further comprises:
[0155] During parameter configuration of the speaker, obtaining at least one of a winding direction of a coil in the speaker, a magnetization direction of a magnetic module, and a positive and negative polarity direction of an input signal;
[0156] Adjusting the electrical performance parameter according to at least one of the winding direction, the magnetization direction, and the positive and negative polarity directions;
[0157] Configuring type information corresponding to the adjusted electrical performance parameters;
[0158] The adjusted electrical performance parameters are different, and the type information corresponding to each of the adjusted electrical performance parameters is also different.
[0159] Here, during the process of configuring the speaker parameters, the speaker configuration parameters may be obtained, and the obtained electrical performance parameters of the speaker may be adjusted based on the speaker configuration parameters. The configuration parameters may include at least one of the following: a winding direction of the speaker coil, a magnetizing direction of the magnetic module, a positive and negative polarity direction of the input signal, an electrical signal of the speaker, an amplitude of the speaker, a phase response of the speaker, etc.
[0160] For example, during the process of configuring the parameters of the speaker, the electronic device can obtain at least one of the winding direction of the coil in the speaker, the magnetization direction of the magnetic module, and the positive and negative polarity directions of the input signal. For example, the winding direction of the coil in the speaker can be obtained to be clockwise or counterclockwise, etc.; the magnetization direction of the magnetic module (such as the speaker magnet, etc.) (i.e., the positive and negative polarity directions of the speaker magnet) can be obtained to be normal axial magnetization, single-sided axial multi-pole magnetization, double-sided axial multi-pole magnetization, full radial magnetization, full radial inner magnetization, or full radial outer magnetization, etc.; the positive and negative polarity directions of the input signal can include: the positive pole of the power supply is connected to the positive pole of the speaker terminal and the negative pole of the power supply is connected to the negative pole of the speaker terminal, or the positive pole of the power supply is connected to the negative pole of the speaker terminal and the negative pole of the power supply is connected to the positive pole of the speaker terminal, etc.
[0161] In some embodiments, the electronic device can obtain at least one of the winding direction of the coil in the speaker, the magnetization direction of the magnetic module, and the positive and negative polarity directions of the input signal by receiving information uploaded by the user. The electronic device can then adjust the electrical performance parameters based on at least one of the winding direction, the magnetization direction, and the positive and negative polarity directions. For example, the winding direction of the coil in the speaker can be adjusted from clockwise to counterclockwise, thereby adjusting the electrical performance parameters (for example, but not limited to, adjusting the first amplitude in the electrical performance parameters to the second amplitude). Type information corresponding to the adjusted electrical performance parameters is then configured, wherein the adjusted electrical performance parameters are different, and the type information corresponding to each adjusted electrical performance parameter is also different. For example, the type information corresponding to the adjusted electrical performance parameter 1 is the second type of manufacturer, the type information corresponding to the adjusted electrical performance parameter 2 is the third type of manufacturer, and the type information corresponding to the adjusted electrical performance parameter 3 is the first type of manufacturer, etc. At the same time, by making the above adjustments, the present disclosure can make the electrical performance parameters of the speaker different without changing the performance of the speaker.
[0162] In the embodiment of the present disclosure, the type information corresponding to the initial electrical performance parameters can be directly configured, which is a simple and easy process to implement. The type information corresponding to the adjusted electrical performance parameters can also be configured, which can make the correlation between the electrical performance parameters and the type information more accurate.
[0163] In some embodiments, the electrical performance parameters include: phase response;
[0164] The type information corresponding to the configuration and the electrical performance parameter includes:
[0165] During the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker;
[0166] Type information corresponding to the phase response is configured.
[0167] In the embodiment of the present disclosure, the electrical performance parameters may include phase response. Phase can be understood as an angle when the motion is compared to uniform circular motion. Phase (Phase) can be the position of a wave at a specific moment in its cycle: a scale of whether it is at a peak, a trough, or a point in between. Phase can describe the measure of the change in the signal waveform, usually in degrees (angles), also known as the phase angle. When the signal waveform changes in a periodic manner, one cycle of the waveform is 360 degrees. Phase response can refer to the relationship between the relative phase and frequency of the output signal. When the speaker is produced and designed, the phase response of speakers from different manufacturers can be controlled by modifying the production design to make them different. When electronic devices (such as but not limited to mobile phones, etc.) are produced, during the calibration stage of the speaker, an intelligent power amplifier can be used to measure the phase response of the speaker. The phase response value corresponding to the speaker manufacturer is determined based on the preset value during the design, and recorded in the electronic device, etc., so that the type of speaker can be determined during the use of the speaker of the electronic device.
[0168] For the phase response, if the frequency of the collected signal is fixed, then the calculated corresponding phase response is a fixed value. If the frequency of the collected signal is not fixed, then the calculated corresponding phase response is not a fixed value. That is, it can be understood that a fixed frequency can correspond to a phase response. If it is a frequency range, then each frequency in the frequency range can correspond to a phase response, and so on.
[0169] The test sound signal can be understood as a sound signal played by the electronic device during the process of configuring the parameters of the speaker or before adjusting the input signal of the speaker. The test operation parameters can be understood as the operating parameters of the speaker detected by the electronic device during the process of configuring the parameters of the speaker or before adjusting the input signal of the speaker, which may include parameters such as the size of the electrical signal, temperature, amplitude, etc., which are not specifically limited in this disclosure. The electronic device can determine the phase response based on the current test operation parameters of the speaker. For example: the electronic device detects that the current test operation parameters of the speaker of the first category manufacturer include a voltage of 5V and a current of 3A, and thus calculates the corresponding phase response to be 1, then the electronic device can use the corresponding phase response 1 of the speaker of the second category manufacturer; the current test operation parameters of the speaker of the second category manufacturer include a voltage of 6V and a current of 5A, and thus calculates the corresponding phase response to be 2, then the electronic device can use the corresponding phase response 2 of the speaker of the second category manufacturer, etc.
[0170] In one possible embodiment, the electrical performance parameters may further include amplitude response, etc., and the amplitude response may refer to the relationship between the amplitude and frequency of the output signal. In the embodiment of the present disclosure, the electrical performance parameters may include phase response, and the electronic device may then determine the phase response based on the current test operating parameters of the speaker and configure type information corresponding to the phase response. The present disclosure can simply and accurately set the correspondence between phase response and type information, which can reduce the time it takes for the electronic device to identify the speaker type information during actual use of the speaker, thereby improving operational efficiency.
[0171] In some embodiments, during the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker includes:
[0172] In the process of the speaker outputting the test sound signal, identifying the frequency type of the test sound signal output by the speaker;
[0173] The phase response is obtained according to the test operation parameters using a calculation strategy corresponding to the frequency type; wherein different frequency types correspond to different calculation strategies.
[0174] In the embodiments of the present disclosure, the frequency type may include at least: fixed frequency or non-fixed frequency, high frequency, medium frequency or low frequency, etc. The classification method of the corresponding frequency type is not specifically limited in the present disclosure. The electronic device may measure the frequency of the test sound signal by methods such as passive frequency measurement method, active frequency measurement method and electronic counting method, and then determine the frequency type of the test sound signal according to a pre-set classification method. For example: the classification method determined by the electronic device may be that the sound signal with a frequency in the range of 0-300 Hz is a low frequency type, the sound signal with a frequency in the range of 301-700 Hz is a medium frequency type, and the sound signal with a frequency in the range of 701-1300 Hz is a high frequency type. The electronic device determines that the frequency of the test sound signal is 350 Hz by the passive frequency measurement method, then the electronic device may determine that the frequency type of the test sound signal output by the speaker is a medium frequency type, etc.
[0175] After the electronic device determines the frequency type, it can use a calculation strategy corresponding to the frequency type to obtain the phase response based on the test operation parameters; different frequency types correspond to different calculation strategies. For example, the electronic device can pre-set a preset relationship between different frequency types and different calculation strategies, such as: a first type of frequency corresponds to a first calculation strategy, a second type of frequency corresponds to a second calculation strategy, a third type of frequency corresponds to a third calculation strategy, and so on. If the electronic device determines that the frequency type of the test sound signal output by the speaker is the second type of frequency, the electronic device can use a second calculation strategy to obtain the phase response based on the test operation parameters.
[0176] In the embodiment of the present disclosure, the frequency type of the test sound signal output by the speaker is identified, and the calculation strategy corresponding to the frequency type is utilized to obtain the phase response according to the test operation parameters. Different frequency types correspond to different calculation strategies, and different calculation strategies can be utilized to determine the phase response according to different frequency types of the test sound signal, thereby meeting the different needs of users in actual use and improving the stability and accuracy of determining the phase response.
[0177] In some embodiments, the frequency type includes: a fixed frequency and a non-fixed frequency; and obtaining the phase response according to the test operation parameters using a calculation strategy corresponding to the frequency type includes:
[0178] In the process of the speaker outputting the test sound signal having the fixed frequency, using a first calculation strategy to obtain the phase response according to the test operation parameters;
[0179] In the process of the speaker outputting the test sound signal having the non-fixed frequency, using a second calculation strategy to obtain the phase response according to the test operation parameters;
[0180] The first calculation strategy is different from the second calculation strategy.
[0181] In an embodiment of the present disclosure, the electronic device can calculate the phase response corresponding to the speaker in a variety of ways, such as determining the method for obtaining the phase response based on the frequency characteristics of the test sound signal. For example: the electronic device outputs a test sound signal with a fixed frequency (such as but not limited to a single-frequency signal with a frequency of F) through the speaker to calculate the phase response; or the electronic device can also output a test sound signal with a non-fixed frequency (such as but not limited to a noise signal such as pink noise or white noise) through the speaker to calculate the phase response. The calculation strategy can refer to the method of calculating the phase response, which can be understood as a calculation formula, etc. The first calculation strategy is different from the second calculation strategy, which can mean that the formulas of the first calculation strategy and the second calculation strategy are different, or the types and quantities of the input test operation parameters are different, or the calculation time is different, etc., which is not specifically limited in the present disclosure.
[0182] For example, an electronic device may set a first calculation strategy to output a single-frequency sound signal at 50 Hz, then detect a speaker current of 5 A, which is then input into Formula A to obtain a phase response of 20 Hz. The electronic device may set a second calculation strategy to output a mixed multi-frequency sound signal of 50 Hz and 30 Hz, then detect a voltage of 7 V across the speaker, which is then input into Formula B to obtain a phase response of 30 Hz, and so on.
[0183] In the embodiment of the present disclosure, by utilizing a plurality of different calculation strategies, the phase response is obtained according to the test operation parameters. Different strategies can be set according to actual usage requirements to meet different needs of users, thereby improving the diversity and flexibility of determining the phase response.
[0184] In some embodiments, the test operation parameters include: a first voltage signal, a first current signal, and a first sampling rate;
[0185] The obtaining the phase response according to the test operation parameters using the first calculation strategy includes:
[0186] determining a start time of a voltage input period of the first voltage signal and a start time of a current input period of the first current signal;
[0187] A phase response of the speaker is determined according to the fixed frequency, a start time of the voltage input period, a start time of the current input period, and the first sampling rate.
[0188] In an embodiment of the present disclosure, the test operation parameters may include: a first voltage signal, a first current signal, and a first sampling rate. The first voltage signal may refer to the voltage signal at both ends of the speaker detected within a first preset time length (for example, but not limited to 2 minutes, etc.), and may be represented by time as the horizontal axis and the voltage signal value as the vertical axis. The represented voltage signal may be continuous or discrete. The first current signal may refer to the current signal of the speaker detected within a second preset time length (for example, but not limited to 3 minutes, etc.), and may be represented by time as the horizontal axis and the current signal value as the vertical axis. The represented current signal may be continuous or discrete. The first preset time length and the second preset time length may be equal or different, and the present disclosure does not make specific limitations.
[0189] The sampling rate, which may also be referred to as the sampling speed or sampling efficiency, may refer to the number of samples extracted from a continuous signal and composed into a discrete signal per unit time, and it may be expressed in Hertz (Hz). The first sampling rate H may refer to the sampling rate determined in the process of the speaker outputting a test sound signal having a fixed frequency F. In this process, the sampling rates for the current signal and the voltage signal may be equal or unequal, and the present disclosure does not make specific limitations. In the embodiment of the present disclosure, the selection of the fixed frequency (also referred to as the single-frequency signal frequency) may be based on the specific design of the speaker to select the frequency with the largest phase response difference, that is, the frequency at which the difference between the phase responses corresponding to different types of speakers (the difference in phase responses corresponding to different speaker types) is obvious may be selected. When the difference between the phase responses corresponding to different types of speakers is the largest, the corresponding frequency is the best.
[0190] Since the voltage signal and current signal collected by the electronic device are signals with periodic characteristics, the electronic device can determine the starting moment of the voltage input cycle of the first voltage signal and the starting moment of the current input cycle of the first current signal. For example: the electronic device can use the time of the starting point position of the first complete positive cycle of the voltage signal as the first starting moment of the voltage input cycle, and can use the time of the starting point position of the first complete positive cycle of the current signal as the second starting moment of the current input cycle, and the first starting moment is before the second starting moment, etc. Then the electronic device can determine the phase response corresponding to the fixed frequency F based on the first starting moment, the second starting moment, the first sampling rate H and the fixed frequency F. For example: the electronic device determines that the first starting moment is 10 seconds, the second starting moment is 23 seconds, the first sampling rate H is 30Hz, the fixed frequency F is 50Hz, etc., then the corresponding phase response can be calculated as 5 according to the relevant formula, etc. The relevant formula is not specifically limited in this disclosure and can be customized according to usage.
[0191] In the embodiment of the present disclosure, the starting moment of the voltage input period of the first voltage signal and the starting moment of the current input period of the first current signal can be determined. Based on the fixed frequency, the starting moment of the voltage input period, the starting moment of the current input period and the first sampling rate, the phase response of the speaker can be determined. The phase response corresponding to a single frequency signal can be calculated simply and quickly with a small amount of calculation.
[0192] In some embodiments, determining the phase response of the speaker according to the fixed frequency, the start time of the voltage input cycle, the start time of the current input cycle, and the first sampling rate includes:
[0193] Determining a time difference between a start time of the voltage input period and a start time of the current input period;
[0194] A phase response corresponding to the fixed frequency is determined according to the time difference, the fixed frequency, and the first sampling rate.
[0195] In an embodiment of the present disclosure, the electronic device can determine the time difference between the starting time of the voltage input cycle and the starting time of the current input cycle, and then determine the phase response corresponding to the fixed frequency according to the time difference, the fixed frequency and the first sampling rate. For example: the electronic device determines that the first starting time is 10 seconds, the second starting time is 23 seconds, the first sampling rate H is 30Hz, the fixed frequency F is 50Hz, etc., then it can be determined that the time difference is 13 seconds. The electronic device can then determine the phase response corresponding to the fixed frequency F according to the time difference of 13 seconds, the first sampling rate H is 30Hz, and the fixed frequency F is 50Hz. The electronic device can calculate the corresponding phase response as 5 according to relevant formulas, etc. The present disclosure does not make any specific limitations on the relevant formulas, and can be customized according to usage.
[0196] In a possible embodiment, the electronic device may use the first calculation strategy to obtain a calculation formula for the phase response according to the test operation parameters as follows:
[0197] pr=(n2-n1)*f / fs (1);
[0198] In formula (1), pr can represent the phase response, n1 can represent the starting moment of the voltage input cycle, n2 can represent the starting moment of the current input cycle, (n2-n1) can represent the time difference between the starting moment of the voltage input cycle and the starting moment of the current input cycle, f can represent the fixed frequency, fs can represent the first sampling rate, wherein the collected voltage signal can be represented by v(n), the collected current signal can be represented by i(n), n can represent the time of signal collection, etc.
[0199] In some embodiments, the test operation parameters include: a second voltage signal, a second current signal, and a second sampling rate;
[0200] The obtaining the phase response according to the test operation parameters by using the second calculation strategy includes:
[0201] Obtaining a voltage data sequence corresponding to the second voltage signal and a current data sequence corresponding to the second current signal; wherein the voltage data sequence and the current data sequence both have a preset length;
[0202] Obtaining a target phase response sequence according to the voltage data sequence and the current data sequence;
[0203] Determining a target frequency according to the preset length and the second sampling rate;
[0204] From the sequence of phase responses, a phase response corresponding to the target frequency is determined.
[0205] In an embodiment of the present disclosure, the test operation parameters may include: a second voltage signal, a second current signal, and a second sampling rate. The electronic device may obtain a voltage data sequence corresponding to the second voltage signal, and a current data sequence corresponding to the second current signal, wherein the voltage data sequence and the current data sequence both have a preset length. A data sequence may refer to a data sequence obtained by processing and transforming an electrical signal (for example, but not limited to, Fourier transform, Laplace transform, sine-cosine transform, etc.), and may refer to a structure such as an array or vector. The transformation methods corresponding to the second voltage signal and the second current signal may be the same or different. The data sequence includes a corresponding sequence length. In an embodiment of the present disclosure, the voltage data sequence and the current data sequence both have a preset length, i.e., the voltage data sequence and the current data sequence have the same preset length, for example, the voltage data sequence and the current data sequence both have a length of 100. In an embodiment of the present disclosure, a data sequence with a preset length may be obtained by collecting a second voltage signal and a second current signal of the same duration and then performing a transformation process. Alternatively, a data sequence with a preset length may be obtained by collecting a second voltage signal and a second current signal of different durations and then performing a transformation process.
[0206] After the electronic device obtains the voltage data sequence and the current data sequence, it can obtain the target phase response sequence based on the voltage data sequence and the current data sequence. For example: the electronic device can perform processing such as addition, subtraction, multiplication, or division on the elements of the corresponding positions of the voltage data sequence and the current data sequence to obtain a target phase response sequence of the same length; the electronic device can also perform processing such as splicing and combination on the voltage data sequence and the current data sequence to obtain a target phase response sequence that is not of the preset length, which is not specifically limited in the present disclosure. In the embodiment of the present disclosure, the preset length (which may also be referred to as the signal length, etc.) determined by the electronic device can be selected based on the computing resources of the electronic device (such as a mobile phone) and the computing accuracy that needs to be achieved. For example: the more computing resources the electronic device has and the higher the computing accuracy required, the longer the preset length selected will be.
[0207] After obtaining the target phase response sequence, the electronic device can determine the target frequency based on the preset length and the second sampling rate, and determine the phase response corresponding to the target frequency from the phase response sequence. Since the second calculation strategy corresponds to a test sound signal with a non-fixed frequency, the electronic device needs to determine the phase response corresponding to a specific frequency. Therefore, the electronic device needs to determine the correspondence between multiple frequencies and the target phase response sequence. The electronic device can determine the target frequency based on the preset length and the second sampling rate. For example, since the obtained target phase response sequence is a discrete sequence and the length is also the preset length, the electronic device can determine the position number of the corresponding element based on the preset length and the second sampling rate, perform correlation processing, and obtain the target frequency. The electronic device can obtain different target frequencies based on the position numbers of different elements in the target phase response sequence. That is, the electronic device can also obtain a target frequency sequence. The target frequency sequence and the elements with the same position number in the target response sequence (that is, the target response and the target frequency) have a one-to-one correspondence.
[0208] In the embodiment of the present disclosure, the electronic device uses a first calculation strategy to determine the phase response corresponding to a fixed frequency (i.e., a single frequency). For example, if the frequency of the single frequency is 50 Hz (i.e., the fixed frequency is 50 Hz), the phase response corresponding to the fixed frequency is 20. The electronic device uses a second calculation strategy to determine a phase response sequence corresponding to a non-fixed frequency (i.e., multiple frequencies). For example, a non-fixed frequency can be formed based on multiple frequencies (e.g., but not limited to 20 Hz, 25 Hz, 30 Hz, etc.), and the resulting phase response sequence is 30, 31, 32, 33, etc. The electronic device can determine a target frequency (e.g., 20 Hz) from the multiple frequencies based on a preset length and a second sampling rate. After determining the target frequency, the electronic device can determine the phase response corresponding to the target frequency from the corresponding position in the phase response sequence based on the target frequency. Assuming that the target frequency corresponds to the element at the first position in the phase response sequence (i.e., 30), the electronic device can determine that the phase response corresponding to 20 Hz is 30. In the same manner, the electronic device can also determine that the phase response corresponding to 25 Hz is 31, the phase response corresponding to 30 Hz is 32, and so on.
[0209] In an embodiment of the present disclosure, a voltage data sequence corresponding to the second voltage signal and a current data sequence corresponding to the second current signal can be obtained, wherein the voltage data sequence and the current data sequence both have a preset length. A target phase response sequence is obtained based on the voltage data sequence and the current data sequence. A target frequency is determined based on the preset length and the second sampling rate, and a phase response corresponding to the target frequency is determined from the phase response sequence. By employing the above-described method, the present disclosure can accurately and efficiently calculate the phase responses corresponding to multiple frequency signals, thereby improving the computational efficiency of calculating the phase response across the entire frequency band.
[0210] In some embodiments, obtaining a target phase response sequence according to the voltage data sequence and the current data sequence includes:
[0211] Obtaining a phase angle sequence of the second voltage signal according to the voltage data sequence;
[0212] Obtaining a phase angle sequence of the second current signal according to the current data sequence;
[0213] The target phase response sequence is determined according to a difference between the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal at corresponding positions.
[0214] In an embodiment of the present disclosure, the electronic device can obtain the phase angle sequence of the second voltage signal based on the voltage data sequence, and can obtain the phase angle sequence of the second current signal based on the current data sequence. For example, the electronic device can obtain the corresponding phase angle by performing a preset phase angle formula calculation on the value corresponding to a single point in the data sequence, and the lengths of the two sequences before and after the processing are equal. The above-mentioned phase angle formula can be a custom angle calculation formula, which is not specifically limited in the present disclosure. The processing method for obtaining the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal in the present disclosure can be the same or different. For example, the electronic device can determine that the voltage data sequence is [1, 2, 3], and the phase angle sequence of the second voltage signal obtained can be [7, 8, 9]; the electronic device can determine that the current data sequence is [3, 6, 9], and the phase angle sequence of the second current signal obtained can be [2, 5, 6], etc.
[0215] The electronic device may determine the target phase response sequence based on the difference between the phase angles at corresponding positions in the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal. For example, if the electronic device determines that the phase angle sequence of the second voltage signal may be [7, 8, 9] and the phase angle sequence of the second current signal may be [2, 5, 6], and the differences in the phase angles at corresponding positions may be 5, 3, and 3, respectively, the electronic device may determine the target phase response sequence to be [5, 3, 3], etc.
[0216] In a possible embodiment, the electronic device uses the second calculation strategy to obtain the calculation formula of the phase response according to the test operation parameters as follows:
[0217] V(n)=fft(v(n)), I(n)=fft(i(n)) (2);
[0218] VA(N) / IA(N)=arctan(b / a), V(N) / I(N)=a+bi (3);
[0219] pr(N)=VA(N)-IA(N) (4);
[0220] f(N)=N*fs / nfft (5);
[0221] In formulas (2), (3), (4) and (5), v(n) can represent the collected voltage signal, i(n) can represent the collected current signal, n can represent the time of signal collection, fft() can represent fast Fourier transform, V(n) can represent the voltage data sequence, I(n) can represent the current data sequence, the elements at each position in V(n) and I(n) can be represented by (a+bi), and then VA(N) and IA(N) are obtained, VA(N) can represent the phase angle sequence of the second voltage signal, IA(N) can represent the phase angle sequence of the second current signal, arctan() can represent inverse tangent transform, pr(N) can represent the target phase response sequence, f(N) can represent the target frequency, N can represent the position number of the element in the sequence determined based on the preset length, fs can represent the second sampling rate, and nfft can represent the preset length.
[0222] In some embodiments, determining the actual current operating parameters of the speaker according to the protection model includes:
[0223] Inputting the current voltage signal and current signal of the speaker into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal;
[0224] The adjusting the input signal of the speaker according to the actual operating parameter includes:
[0225] When the temperature is greater than a temperature threshold, reducing the voltage signal input to the speaker; and / or
[0226] When the amplitude is greater than an amplitude threshold, the current signal input to the speaker is reduced.
[0227] In the embodiment of the present disclosure, after the electronic device determines the protection model corresponding to the type information, it can determine the current actual operating parameters of the speaker according to the protection model. The electronic device can input the current voltage signal and current signal of the speaker into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal. In an AC circuit, the current amplitude or voltage amplitude refers to the maximum value of the current or voltage change, also called the peak value of the voltage or current. In acoustic vibration, the amplitude is the maximum value of the difference between the sound pressure and the static pressure. The amplitude of the sound wave is measured in decibels, and the size of the sound wave amplitude can determine the sound intensity. For example: the electronic device determines that the current voltage signal and current signal of the speaker are 5V and 2A respectively, inputs protection model A, and obtains the current temperature of the speaker and the amplitude of the output sound signal are 20 degrees and 15 decibels respectively.
[0228] After the electronic device obtains the current temperature of the speaker and the amplitude of the output sound signal, it can adjust the input signal of the speaker according to the actual operating parameters. The electronic device can reduce the voltage signal input to the speaker when the temperature is greater than the temperature threshold; or reduce the current signal input to the speaker when the amplitude is greater than the amplitude threshold, etc. For example: the electronic device can preset the temperature threshold to 30 degrees, the amplitude threshold to 10 decibels, etc., and then the electronic device determines that the current temperature of the speaker is less than the temperature threshold and the amplitude of the output sound signal is greater than the amplitude threshold. The electronic device can reduce the voltage signal input to the speaker, or increase the current signal input to the speaker, etc. In the embodiment of the present disclosure, the corresponding method of adjusting the input signal of the speaker is not specifically limited, and can be adjusted according to the temperature, according to the amplitude, or according to both the temperature and the amplitude; the input voltage at both ends of the speaker can be adjusted, the input current of the speaker can be adjusted, or the input voltage at both ends of the speaker and the input current of the speaker can be adjusted at the same time, etc.
[0229] In the embodiment of the present disclosure, the current voltage signal and current signal of the speaker are input into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal. When the temperature is greater than the temperature threshold, the voltage signal input to the speaker is reduced, and / or when the amplitude is greater than the amplitude threshold, the current signal input to the speaker is reduced. This allows the input signal of the speaker to be adjusted simply and accurately, thereby maximizing the speaker performance.
[0230] Through the technical solution disclosed in the present invention, in the process of the speaker outputting a sound signal, the corresponding protection model can be determined by the type information of the speaker, so that the current actual operating parameters of the speaker can be determined according to the protection model, and the input signal of the speaker can be adjusted according to the actual operating parameters. On the one hand, by associating the type information of the speaker with the protection model, the actual operating parameters determined based on the protection model can be more consistent with the performance of the speaker, thereby accurately controlling the input signal of the speaker and reducing the possibility of damage to the speaker due to the input signal exceeding the limit; on the other hand, the hardware of the electronic device itself can be used to accurately adjust the input signal without modifying the circuit or structure of the electronic device, and it can also reduce R&D and production costs; on the other hand, the software-based method for identifying the type of speaker is more secure and stable than improving the hardware to identify the type of speaker.
[0231] Figure 3 FIG. 1 is a block diagram of a speaker control device according to an exemplary embodiment. Figure 3 As shown, the device is applied to an electronic device having a speaker, and the control device 300 of the speaker mainly includes:
[0232] The first determining module 301 is configured to determine, according to the type information of the speaker, a protection model corresponding to the type information during the process of the speaker outputting the sound signal;
[0233] A second determining module 302 is configured to determine the actual current operating parameters of the speaker according to the protection model;
[0234] The third determining module 303 is configured to adjust the input signal of the speaker according to the actual operating parameters.
[0235] In some embodiments, the apparatus 300 further includes:
[0236] a first acquisition module configured to acquire current electrical performance parameters of the speaker;
[0237] an association module configured to determine the type information of the speaker based on the current electrical performance parameter and a preset association relationship;
[0238] The association relationship is used to characterize the mapping relationship between the electrical performance parameters and the type information.
[0239] In some embodiments, the apparatus 300 further includes:
[0240] a second acquisition module configured to acquire electrical performance parameters of the speaker during parameter configuration of the speaker;
[0241] A first configuration module is configured to configure type information corresponding to the electrical performance parameter;
[0242] An establishing module configured to establish an association relationship between the electrical performance parameter and the type information;
[0243] A storage module is configured to store the electrical performance parameters, the type information, and the association relationship in a memory of the electronic device.
[0244] In some embodiments, the apparatus 300 further includes:
[0245] a third acquisition module configured to acquire at least one of a winding direction of a coil in the speaker, a magnetization direction of a magnetic module, and a positive and negative polarity direction of an input signal during parameter configuration of the speaker;
[0246] an adjustment module configured to adjust the electrical performance parameter according to at least one of the winding direction, the magnetization direction, and the positive and negative polarity directions;
[0247] A second configuration module is configured to configure type information corresponding to the adjusted electrical performance parameters;
[0248] The adjusted electrical performance parameters are different, and the type information corresponding to each of the adjusted electrical performance parameters is also different.
[0249] In some embodiments, the electrical performance parameters include: phase response;
[0250] The first configuration module is configured as follows:
[0251] During the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker;
[0252] Type information corresponding to the phase response is configured.
[0253] In some embodiments, the first configuration module is configured to:
[0254] In the process of the speaker outputting the test sound signal, identifying the frequency type of the test sound signal output by the speaker;
[0255] The phase response is obtained according to the test operation parameters using a calculation strategy corresponding to the frequency type; wherein different frequency types correspond to different calculation strategies.
[0256] In some embodiments, the frequency type includes: fixed frequency and non-fixed frequency; the first configuration module is configured to:
[0257] In the process of the speaker outputting the test sound signal having the fixed frequency, using a first calculation strategy to obtain the phase response according to the test operation parameters;
[0258] In the process of the speaker outputting the test sound signal having the non-fixed frequency, using a second calculation strategy to obtain the phase response according to the test operation parameters;
[0259] The first calculation strategy is different from the second calculation strategy.
[0260] In some embodiments, the test operation parameters include: a first voltage signal, a first current signal, and a first sampling rate;
[0261] The first configuration module is configured as follows:
[0262] determining a start time of a voltage input period of the first voltage signal and a start time of a current input period of the first current signal;
[0263] A phase response of the speaker is determined according to the fixed frequency, a start time of the voltage input period, a start time of the current input period, and the first sampling rate.
[0264] In some embodiments, the first configuration module is configured to:
[0265] Determining a time difference between a start time of the voltage input period and a start time of the current input period;
[0266] A phase response corresponding to the fixed frequency is determined according to the time difference, the fixed frequency, and the first sampling rate.
[0267] In some embodiments, the test operation parameters include: a second voltage signal, a second current signal, and a second sampling rate;
[0268] The first configuration module is configured as follows:
[0269] Obtaining a voltage data sequence corresponding to the second voltage signal and a current data sequence corresponding to the second current signal; wherein the voltage data sequence and the current data sequence both have a preset length;
[0270] Obtaining a target phase response sequence according to the voltage data sequence and the current data sequence;
[0271] Determining a target frequency according to the preset length and the second sampling rate;
[0272] From the sequence of phase responses, a phase response corresponding to the target frequency is determined.
[0273] In some embodiments, the first configuration module is configured to:
[0274] Obtaining a phase angle sequence of the second voltage signal according to the voltage data sequence;
[0275] Obtaining a phase angle sequence of the second current signal according to the current data sequence;
[0276] The target phase response sequence is determined according to a difference between the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal at corresponding positions.
[0277] In some embodiments, the second determining module 302 is configured to:
[0278] Inputting the current voltage signal and current signal of the speaker into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal;
[0279] The third determining module 303 is configured to:
[0280] When the temperature is greater than a temperature threshold, reducing the voltage signal input to the speaker; and / or
[0281] When the amplitude is greater than an amplitude threshold, the current signal input to the speaker is reduced.
[0282] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0283] Figure 4 4 is a hardware block diagram of a speaker control device according to an exemplary embodiment. For example, device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0284] Reference Figure 4 , apparatus 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0285] Processing component 402 generally controls the overall operation of device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the above-described method. In addition, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
[0286] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0287] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.
[0288] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0289] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC) that is configured to receive external audio signals when the device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0290] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0291] The sensor assembly 414 includes one or more sensors for providing various aspects of the status assessment of the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400. The sensor assembly 414 can also detect changes in the position of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and temperature changes of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0292] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WI-FI, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0293] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.
[0294] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by the processor 420 of the apparatus 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0295] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a speaker control device, enables the speaker control device to perform a speaker control method, the method being applied to an electronic device having a speaker, comprising:
[0296] In the process of the speaker outputting the sound signal, determining, according to the type information of the speaker, a protection model corresponding to the type information;
[0297] determining, according to the protection model, current actual operating parameters of the speaker;
[0298] The input signal of the speaker is adjusted according to the actual operating parameters.
[0299] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0300] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for controlling a loudspeaker, characterized in that: Applied to an electronic device having a speaker, the method includes: Acquiring current electrical performance parameters of the speaker; wherein the electrical performance parameters include: phase response; Determining the type information of the speaker based on the current electrical performance parameter and a preset association relationship; wherein the association relationship is used to represent a mapping relationship between the electrical performance parameter and the type information; During the process of the speaker outputting the sound signal, determining a protection model corresponding to the type information according to the type information of the speaker; wherein the type information of the speaker is used to characterize the type of the speaker itself; determining, according to the protection model, current actual operating parameters of the speaker; The input signal of the speaker is adjusted according to the actual operating parameters.
2. The method according to claim 1, characterized in that The method further comprises: In the process of configuring parameters of the speaker, obtaining electrical performance parameters of the speaker; Configuring type information corresponding to the electrical performance parameters; Establishing an association relationship between the electrical performance parameter and the type information; The electrical performance parameter, the type information, and the association relationship are stored in a memory of the electronic device.
3. The method according to claim 2, characterized in that The method further comprises: During parameter configuration of the speaker, obtaining at least one of a winding direction of a coil in the speaker, a magnetization direction of a magnetic module, and a positive and negative polarity direction of an input signal; Adjusting the electrical performance parameter according to at least one of the winding direction, the magnetization direction, and the positive and negative polarity directions; Configuring type information corresponding to the adjusted electrical performance parameters; The adjusted electrical performance parameters are different, and the type information corresponding to each of the adjusted electrical performance parameters is also different.
4. The method according to claim 2 or 3, characterized in that The type information corresponding to the configuration and the electrical performance parameter includes: During the process of the speaker outputting the test sound signal, determining the phase response according to current test operation parameters of the speaker; Type information corresponding to the phase response is configured.
5. The method according to claim 4, characterized in that The determining of the phase response according to current test operation parameters of the speaker during the process of the speaker outputting the test sound signal includes: In the process of the speaker outputting the test sound signal, identifying the frequency type of the test sound signal output by the speaker; The phase response is obtained according to the test operation parameters using a calculation strategy corresponding to the frequency type; wherein different frequency types correspond to different calculation strategies.
6. The method according to claim 5, characterized in that The frequency type includes: fixed frequency and non-fixed frequency; and obtaining the phase response according to the test operation parameters using a calculation strategy corresponding to the frequency type includes: In the process of the speaker outputting a test sound signal with a fixed frequency, using a first calculation strategy to obtain the phase response according to the test operation parameters; In the process of the speaker outputting the test sound signal with a non-fixed frequency, using a second calculation strategy to obtain the phase response according to the test operation parameters; The first calculation strategy is different from the second calculation strategy.
7. The method according to claim 6, characterized in that The test operation parameters include: a first voltage signal, a first current signal and a first sampling rate; The obtaining the phase response according to the test operation parameters using the first calculation strategy includes: determining a start time of a voltage input period of the first voltage signal and a start time of a current input period of the first current signal; A phase response of the speaker is determined according to the fixed frequency, a start time of the voltage input period, a start time of the current input period, and the first sampling rate.
8. The method according to claim 7, characterized in that The determining the phase response of the speaker according to the fixed frequency, the starting time of the voltage input period, the starting time of the current input period, and the first sampling rate includes: Determining a time difference between a start time of the voltage input period and a start time of the current input period; A phase response corresponding to the fixed frequency is determined according to the time difference, the fixed frequency, and the first sampling rate.
9. The method according to claim 6, characterized in that The test operation parameters include: a second voltage signal, a second current signal and a second sampling rate; The obtaining the phase response according to the test operation parameters by using the second calculation strategy includes: Obtaining a voltage data sequence corresponding to the second voltage signal and a current data sequence corresponding to the second current signal; wherein the voltage data sequence and the current data sequence both have a preset length; Obtaining a target phase response sequence according to the voltage data sequence and the current data sequence; Determining a target frequency according to the preset length and the second sampling rate; From the sequence of phase responses, a phase response corresponding to the target frequency is determined.
10. The method according to claim 9, characterized in that Obtaining a target phase response sequence according to the voltage data sequence and the current data sequence includes: Obtaining a phase angle sequence of the second voltage signal according to the voltage data sequence; Obtaining a phase angle sequence of the second current signal according to the current data sequence; The target phase response sequence is determined according to a difference between the phase angle sequence of the second voltage signal and the phase angle sequence of the second current signal at corresponding positions.
11. The method according to claim 1, characterized in that Determining the actual current operating parameters of the speaker according to the protection model includes: Inputting the current voltage signal and current signal of the speaker into the protection model to obtain the current temperature of the speaker and / or the amplitude of the output sound signal; The adjusting the input signal of the speaker according to the actual operating parameter includes: When the temperature is greater than a temperature threshold, reducing the voltage signal input to the speaker; and / or When the amplitude is greater than an amplitude threshold, the current signal input to the speaker is reduced.
12. A speaker control device, characterized in that: Applicable to electronic devices with speakers, including: A first acquisition module is configured to acquire current electrical performance parameters of the speaker; wherein the electrical performance parameters include: phase response; an association module configured to determine the type information of the speaker based on the current electrical performance parameter and a preset association relationship; wherein the association relationship is used to represent a mapping relationship between the electrical performance parameter and the type information; A first determining module is configured to determine, in a process in which the speaker outputs a sound signal, a protection model corresponding to the type information according to the type information of the speaker; wherein the type information of the speaker is used to represent the type of the speaker itself; a second determining module configured to determine actual current operating parameters of the speaker according to the protection model; The third determining module is configured to adjust the input signal of the speaker according to the actual operating parameters.
13. A speaker control device, characterized in that: include: processor; a memory configured to store processor-executable instructions; The processor is configured to implement the steps of the speaker control method according to any one of claims 1 to 11 when executed.
14. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a speaker control device, enables the device to perform the steps of the speaker control method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Audio signal processing method and electronic equipment
CN111479198A