Signal processing method, device and equipment and computer readable storage medium
By obtaining the feedback circuit parameters of the speakers for signal processing, combining linear and nonlinear parameter processing, and performing amplitude limiting processing, the problem of speaker distortion is solved, and the accuracy and sound quality of nonlinear compensation are improved.
Patent Information
- Application Number
- CN202310679578.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
In the nonlinear compensation processing, it is difficult to accurately reduce the distortion of the speaker, resulting in limited accuracy and effect of the nonlinear compensation processing.
By obtaining the feedback circuit parameters of the previous frame signal of the current frame signal, the signal parameters are determined, including the nonlinear and linear parameters of the harmonics and time fundamental waves when the speaker is reproduced, linear and nonlinear processing is performed, and after nonlinear filtering, the signal parameters are determined, and the harmonics and time fundamentals are not linear. Perform a limiting process to reduce speaker distortion.
Improves the accuracy of nonlinear compensation processing, reduces speaker distortion, and improves sound quality and equipment service life.
Smart Images

Figure CN119110216A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing technology, and in particular to a signal processing method, device, equipment and computer-readable storage medium. Background Art
[0002] When the speaker receives a loud signal, the speaker receives a higher driving voltage, and nonlinear distortion will occur in the speaker. At present, in order to reduce the nonlinear distortion of the speaker and ensure the quality of the speaker's output audio, the loud signal is compensated by inverse filtering the nonlinear distortion, so as to reduce the distortion of the loud signal played by the speaker without losing the loud sound quality and volume. In the process of nonlinear compensation processing, the filter parameters of the nonlinear compensation filter are adjusted by the signal parameters corresponding to the previous frame signal, and the current frame signal is processed by the nonlinear compensation filter after the adjustment of the parameters, which makes the new signal after nonlinear compensation unable to completely offset the distortion harmonics generated by the signal, resulting in reduced accuracy of nonlinear compensation processing, which affects the effect of reducing speaker distortion through nonlinear compensation. Summary of the invention
[0003] The main purpose of the present invention is to provide a signal processing method, device, equipment and computer-readable storage medium, aiming to improve the accuracy of nonlinear compensation processing, thereby improving the processing effect of reducing speaker distortion through nonlinear compensation.
[0004] To achieve the above object, the present invention provides a signal processing method, which comprises the following steps:
[0005] Acquire feedback circuit parameters of a previous frame signal of a current frame signal, and determine signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to the fundamental wave when the speaker reproduces the previous frame signal;
[0006] Processing the current frame signal by the linear parameter to obtain a linear signal, and processing the linear signal by the nonlinear parameter to obtain a nonlinear signal;
[0007] The nonlinear signal is subjected to amplitude limiting processing to obtain a target signal, so as to drive a loudspeaker to produce sound according to the target signal.
[0008] Optionally, before the step of performing amplitude limiting processing on the nonlinear signal to obtain a target signal, the method further includes:
[0009] Detecting whether the signal voltage of the nonlinear signal is within a preset voltage range;
[0010] The step of performing amplitude limiting processing on the nonlinear signal to obtain a target signal comprises:
[0011] If the signal voltage is not within the voltage range, the nonlinear signal is subjected to amplitude limiting processing to obtain a target signal.
[0012] Optionally, the step of processing the current frame signal by using the linear parameter to obtain a linear signal includes:
[0013] Calculating a theoretical linear displacement caused by the current frame signal based on the linear parameter;
[0014] The voltage of the current frame signal is adjusted according to the theoretical linear displacement to obtain a linear signal, wherein the actual linear displacement caused by the current frame signal is consistent with the theoretical linear displacement.
[0015] Optionally, the step of processing the linear signal by using the nonlinear parameter to obtain a nonlinear signal includes:
[0016] Using the nonlinear parameters as filter coefficients of a nonlinear filter of the loudspeaker to obtain a target filter;
[0017] The linear signal is inversely filtered by the target filter to obtain a nonlinear signal.
[0018] Optionally, before the step of acquiring the feedback circuit parameter of the previous frame signal of the current frame signal, the method further includes:
[0019] Detecting whether the speaker is in a high volume state, wherein the high volume state is a state in which the volume of a signal input to the speaker is greater than a preset volume range;
[0020] If the speaker is in the high volume state, detecting whether an instruction to start nonlinear compensation processing is received;
[0021] The step of obtaining the feedback circuit parameters of the previous frame signal of the current frame signal includes:
[0022] If the start instruction is received, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained.
[0023] Optionally, the step of detecting whether the speaker is in a high volume state includes:
[0024] Detecting whether the previous frame signal meets a preset volume condition, wherein the volume condition is that the signal volume is less than a preset volume and the signal gain is less than a preset gain;
[0025] If the previous frame signal does not meet the volume condition, it is determined that the speaker is in the high volume state.
[0026] Optionally, before the step of detecting whether the speaker is in a high volume state, the method further includes:
[0027] Acquire an ambient sound signal of the external environment in which the speaker is located, and determine a volume level of the ambient sound signal;
[0028] The signal volume of the previous frame signal is adjusted based on the volume level.
[0029] To achieve the above object, the present invention further provides a signal processing device, the signal processing device comprising:
[0030] An acquisition module, used to acquire feedback circuit parameters of a previous frame signal of a current frame signal, and determine signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to fundamental waves when the speaker reproduces the previous frame signal;
[0031] A processing module, configured to process the current frame signal by using the linear parameter to obtain a linear signal, and to process the linear signal by using the nonlinear parameter to obtain a nonlinear signal;
[0032] The processing module is further used to perform limiting processing on the nonlinear signal to obtain a target signal, so as to drive the speaker to produce sound according to the target signal.
[0033] To achieve the above-mentioned purpose, the present invention also provides a signal processing device, which includes: a memory, a processor, and a signal processing program stored in the memory and executable on the processor, and the signal processing program implements the steps of the signal processing method described above when executed by the processor.
[0034] In addition, to achieve the above-mentioned purpose, the present invention further proposes a computer-readable storage medium, on which a signal processing program is stored, and when the signal processing program is executed by a processor, the steps of the signal processing method described above are implemented.
[0035] In the present invention, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained, and the signal parameters of the previous frame signal are determined based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to fundamental waves when the speaker reproduces the previous frame signal; the current frame signal is processed by linear parameters to obtain a linear signal, and the linear signal is processed by nonlinear parameters to obtain a nonlinear signal; the nonlinear signal is limited to obtain a target signal, so as to drive the speaker to sound according to the target signal. The present invention realizes the actual linear displacement and actual nonlinear displacement of the limiting signal by performing limiting processing after nonlinear filtering, thereby reducing the distortion of the speaker. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;
[0037] Figure 2 It is a flowchart of a first embodiment of a signal processing method of the present invention;
[0038] Figure 3 A schematic diagram of a flow chart of an implementation method of a signal processing method of the present invention;
[0039] Figure 4 A schematic diagram of a nonlinear compensation process involved in an embodiment of a signal processing method of the present invention;
[0040] Figure 5 Schematic diagram of functional modules of a preferred embodiment of a signal processing device of the present invention.
[0041] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0043] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0044] It should be noted that the signal processing device in the embodiment of the present invention may be a smart phone, a personal computer, a server, a head-mounted device (such as an extended reality device), etc., and no specific limitation is made here.
[0045] like Figure 1As shown, the signal processing device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0046] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the signal processing device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0047] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a signal processing program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the signal processing program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the signal processing program stored in the memory 1005 and perform the following operations:
[0048] Acquire feedback circuit parameters of a previous frame signal of a current frame signal, and determine signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to the fundamental wave when the speaker reproduces the previous frame signal;
[0049] Processing the current frame signal by the linear parameter to obtain a linear signal, and processing the linear signal by the nonlinear parameter to obtain a nonlinear signal;
[0050] The nonlinear signal is subjected to amplitude limiting processing to obtain a target signal, so as to drive a loudspeaker to produce sound according to the target signal.
[0051] Further, before the operation of performing the limiting process on the nonlinear signal to obtain the target signal, the processor 1001 may also be used to call the signal processing program stored in the memory 1005 and perform the following operations:
[0052] Detecting whether the signal voltage of the nonlinear signal is within a preset voltage range;
[0053] The operation of performing amplitude limiting processing on the nonlinear signal to obtain a target signal comprises:
[0054] If the signal voltage is not within the voltage range, the nonlinear signal is subjected to amplitude limiting processing to obtain a target signal.
[0055] Further, the operation of processing the current frame signal by using the linear parameter to obtain a linear signal includes:
[0056] Calculating a theoretical linear displacement caused by the current frame signal based on the linear parameter;
[0057] The voltage of the current frame signal is adjusted according to the theoretical linear displacement to obtain a linear signal, wherein the actual linear displacement caused by the current frame signal is consistent with the theoretical linear displacement.
[0058] Furthermore, the operation of processing the linear signal by using the nonlinear parameter to obtain a nonlinear signal includes:
[0059] Using the nonlinear parameters as filter coefficients of a nonlinear filter of the loudspeaker to obtain a target filter;
[0060] The linear signal is inversely filtered by the target filter to obtain a nonlinear signal.
[0061] Furthermore, before the operation of obtaining the feedback circuit parameters of the previous frame signal of the current frame signal, the processor 1001 may also be used to call the signal processing program stored in the memory 1005 and perform the following operations:
[0062] Detecting whether the speaker is in a high volume state, wherein the high volume state is a state in which the volume of a signal input to the speaker is greater than a preset volume range;
[0063] If the speaker is in the high volume state, detecting whether an instruction to start nonlinear compensation processing is received;
[0064] The operation of obtaining the feedback circuit parameter of the previous frame signal of the current frame signal includes:
[0065] If the start instruction is received, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained.
[0066] Further, the operation of detecting whether the speaker is in a high volume state includes:
[0067] Detecting whether the previous frame signal meets a preset volume condition, wherein the volume condition is that the signal volume is less than a preset volume and the signal gain is less than a preset gain;
[0068] If the previous frame signal does not meet the volume condition, it is determined that the speaker is in the high volume state.
[0069] Further, before the operation of detecting whether the speaker is in a high volume state, the processor 1001 may also be used to call a signal processing program stored in the memory 1005 and perform the following operations:
[0070] Acquire an ambient sound signal of the external environment in which the speaker is located, and determine a volume level of the ambient sound signal;
[0071] The signal volume of the previous frame signal is adjusted based on the volume level.
[0072] Based on the above structure, various embodiments of the signal processing method are proposed.
[0073] Reference Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a signal processing method according to the present invention.
[0074] The embodiments of the present invention provide embodiments of the signal processing method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here. In this embodiment, the execution subject of the signal processing method may be a personal computer, a smart phone, a head-mounted device (such as an extended reality device) and other devices, which are not limited in this embodiment. For the sake of ease of description, the execution subject is omitted to explain each embodiment. In this embodiment, the signal processing method includes:
[0075] Step S10, obtaining feedback circuit parameters of a previous frame signal of the current frame signal, and determining signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to the fundamental wave when the speaker reproduces the previous frame signal;
[0076] When the loudspeaker receives a loud volume signal exceeding the preset volume range, the loudspeaker is subjected to a larger driving voltage, and the voice coil in the loudspeaker moves beyond the maximum displacement allowed by the loudspeaker without distortion. At this time, harmonic resonance occurs in the loudspeaker, causing the output signal of the loudspeaker to contain harmonic signals that are not included in the sound source signal (that is, the signal that the loudspeaker needs to reproduce the audio), that is, nonlinear distortion occurs in the loudspeaker.
[0077] Before the sound source signal is input into the speaker to be reproduced through the speaker audio, the sound source signal can be processed. In the process of processing the sound source signal, the sound source signal is processed in frames. Hereinafter, a frame of the sound source signal currently being processed is referred to as a current frame signal for distinction.
[0078] In this embodiment, non-compensation processing is performed on the current frame signal. Specifically, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained, wherein the feedback circuit parameters may include the signal current (hereinafter referred to as feedback voltage for distinction) and the signal voltage (hereinafter referred to as feedback current for distinction) when the previous frame signal drives the speaker to sound. In one feasible implementation, the feedback voltage and feedback current may be directly read by a smartPA (intelligent power amplifier) chip that performs nonlinear compensation processing; in another feasible implementation, the feedback voltage and feedback current may also be obtained by a circuit device such as a multimeter.
[0079] In this embodiment, the signal parameters of the previous frame signal are determined based on the feedback circuit parameters. Specifically, the signal parameters include nonlinear parameters corresponding to the harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to the fundamental wave when the speaker reproduces the previous frame signal. Specifically, the signal parameters may include a mechanoelectric coupling coefficient BL, an elastic coefficient K, and a voice coil inductance coefficient L, wherein the linear parameters are zero-order signal parameters, that is, zero-order mechanoelectric coupling coefficient BL(0), zero-order elastic coefficient K(0), and zero-order voice coil inductance coefficient L(0); the nonlinear parameters are non-zero-order signal parameters, for example, they may be 1st-order signal parameters to 5th-order signal parameters. The specific process of determining the signal parameters based on the feedback circuit parameters of the speaker can refer to the conventional calculation process, which will not be described in detail here.
[0080] Step S20, processing the current frame signal by the linear parameter to obtain a linear signal, and processing the linear signal by the nonlinear parameter to obtain a nonlinear signal;
[0081] In this embodiment, the voice coil displacement caused by the fundamental wave part when the speaker reproduces the current frame of sound signal is called linear displacement, and the voice coil displacement caused by the harmonic part generated by the harmonic resonance when the speaker reproduces the current frame of sound signal is called nonlinear displacement. Specifically, the current frame of signal is processed by linear parameters, and the signal voltage of the current frame of signal is adjusted, thereby adjusting the linear displacement caused by the current frame of signal, so that the linear displacement actually caused by the current frame of signal (hereinafter referred to as actual linear displacement for distinction) can be adjusted based on the linear parameters, so that the actual linear displacement caused by the current frame of signal matches the actual parameters of the speaker, thereby improving the accuracy of the speaker in reproducing the current frame of signal, and the current frame of signal processed by linear parameters is hereinafter referred to as linear signal for distinction.
[0082] In a feasible implementation, linear parameters may be used to modify module parameters of a linear displacement module in a loudspeaker nonlinear compensation algorithm, and a linear signal may be obtained by processing a current frame signal through the linear displacement module after the module parameters are modified.
[0083] In this embodiment, after the current frame signal is processed by linear parameters to obtain linear parameters, the linear signal is processed by nonlinear parameters to adjust the signal voltage of the linear signal, thereby reducing the nonlinear displacement of the voice coil caused by harmonics generated when the speaker reproduces the current frame signal (hereinafter referred to as actual nonlinear displacement for distinction), so that the actual nonlinear displacement caused by the current frame signal is adjusted based on the nonlinear parameters. The signal obtained by nonlinear parameter processing is referred to as the target signal below.
[0084] In a feasible implementation, the specific process of obtaining the target signal by processing the nonlinear parameters may be: using the nonlinear parameters as filter coefficients of the nonlinear filter of the loudspeaker to obtain the target filter, and inverse filtering the linear signal by the target filter to obtain the target signal.
[0085] In another feasible implementation, obtaining the target signal by processing the nonlinear parameters may also be: establishing a nonlinear model of the speaker, using the nonlinear parameters as variable parameters of the nonlinear model, using the linear signal as an independent variable, and calculating the target signal. In this implementation, the nonlinear model may be:
[0086]
[0087] Among them, R is the resistance of the speaker, which can be calculated based on the feedback voltage and feedback current, L is the voice coil inductance in the nonlinear parameters, BL(x) is the electromechanical coupling coefficient in the nonlinear parameters, i is the current, and x is the linear signal.
[0088] In a specific implementation, the target signal may be obtained by processing through nonlinear parameters in other ways, which is not limited here.
[0089] Step S30, performing limiting processing on the nonlinear signal to obtain a target signal, so as to drive a loudspeaker to produce sound according to the target signal.
[0090] In this embodiment, the voltage of the nonlinear signal is limited to obtain a target signal, so as to drive the speaker to produce sound according to the target signal.
[0091] Specifically, the target signal is output to the positive and negative ends of the speaker, and the target signal drives the speaker voice coil to reciprocate, thereby driving the speaker to produce sound. Further, in a feasible implementation, the target signal can be power-amplified and the amplified signal can be output to both ends of the speaker, thereby driving the speaker to produce sound.
[0092] Furthermore, in a feasible implementation manner, the signal processing performed on the current frame signal may specifically include gain, volume adjustment, equalization, dynamic range control and other processing, and the nonlinear compensation processing may be the last processing step of the multiple processing of the sound source signal. That is, in this implementation manner, after performing gain, volume adjustment, equalization, dynamic range control and other processing on the current frame signal, the processed current frame signal is subjected to nonlinear compensation processing (specifically including linear processing and nonlinear processing), and then the current frame signal after nonlinear compensation is output to the speaker.
[0093] Furthermore, in a feasible implementation manner, before step S10, the following steps are further included:
[0094] Step S40, detecting whether the speaker is in a high volume state, wherein the high volume state is a state in which the volume of a signal input to the speaker is greater than a preset volume range;
[0095] In this implementation, before detecting the start instruction, it is detected whether the speaker is in a high volume state, wherein the high volume state is a state in which the signal volume input to the speaker is greater than a preset volume range.
[0096] Specifically, in one feasible implementation, whether the speaker is in a high volume state may be determined based on the signal volume and gain that the speaker has received; in another feasible implementation, whether the speaker is in a high volume state may also be determined based on the signal voltage that the speaker has received. The specific settings may be made according to actual needs and are not limited here.
[0097] Step S50, if the speaker is in the high volume state, detecting whether an instruction to start nonlinear compensation processing is received;
[0098] If the speaker is in a high volume state, it is determined that the speaker has nonlinear distortion, and at this time, it is detected whether an on instruction for starting the nonlinear compensation process is received. Specifically, in one feasible implementation, the on instruction may be an instruction issued by a user manually, for example, the user issues an on instruction by a key or voice control; in another feasible implementation, the on instruction may also be an instruction automatically triggered according to a current frame signal or the state of the speaker. For example, in one feasible implementation, when it is determined that the speaker is in a high volume state, it is determined that the on instruction is triggered.
[0099] In this implementation, the step S10 includes:
[0100] Step S101: if the start instruction is received, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained.
[0101] If a start instruction is received, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained. This embodiment detects whether the speaker is in a high volume state before detecting the start instruction to determine whether the speaker has nonlinear distortion, and detects the start instruction under the condition that the speaker has nonlinear distortion. This embodiment implements nonlinear compensation processing when receiving an instruction to start nonlinear compensation processing, so that the device that applies the nonlinear compensation algorithm does not need to perform nonlinear compensation all the time, thereby reducing the power consumption of the device that applies the nonlinear compensation algorithm. In addition, this embodiment can make the nonlinear compensation processing more in line with the actual needs of users and improve the user's experience of using nonlinear compensation devices.
[0102] Further, in a feasible implementation manner, the step S40 includes:
[0103] Step S401, detecting whether the previous frame signal meets a preset volume condition, wherein the volume condition is that the signal volume is less than a preset volume and the signal gain is less than a preset gain;
[0104] In this embodiment, the signal condition when the speaker is not in a high volume state (hereinafter referred to as the volume condition for distinction) is preset, wherein the volume condition is that the signal volume is less than a preset volume and the signal gain is less than a preset gain. The preset volume and preset gain can be set according to actual needs and are not limited here.
[0105] Specifically, in this implementation, it is detected whether the previous frame signal meets the preset volume condition to determine whether the speaker is in a high volume state.
[0106] Step S402: If the previous frame signal does not meet the volume condition, it is determined that the speaker is in the high volume state.
[0107] If the previous frame signal does not meet the volume condition, it is determined that the signal volume of the previous frame signal is too loud or the gain is too high, and at this time it is determined that the speaker is in a high volume state.
[0108] Furthermore, in another feasible implementation, it is also possible to detect whether the feedback voltage of the previous frame signal is greater than a preset voltage threshold to determine whether the speaker is in a high volume state. If the feedback voltage is greater than the voltage threshold, it is determined that the speaker is in a high volume state. At this time, nonlinear compensation processing needs to be performed on the current frame signal.
[0109] Furthermore, in a feasible implementation manner, before step S40, the following steps are further included:
[0110] Step S60, obtaining an ambient sound signal of the external environment in which the speaker is located, and determining a volume level of the ambient sound signal;
[0111] In this implementation manner, before the step of detecting whether the previous frame signal meets the preset volume condition, an ambient sound signal of the external environment in which the speaker is located is obtained, and the volume level of the ambient sound signal is determined.
[0112] In a specific implementation, the volume level may be determined according to a correspondence table between the loudness of the ambient sound signal and the volume level; or the loudness of the ambient sound signal may be directly used as the volume level. Further, in a feasible manner, the volume level may be determined according to a correspondence table between the loudness of the ambient sound signal and the volume level. In this implementation, the correspondence between the loudness of the ambient sound signal and the corresponding level may refer to the following table:
[0113] Sound signal loudness / db Volume Level (70,75) 10 75 11 (75,80) 12 80 13 (80,85) 14 Greater than 85 15
[0114] Step S70: adjusting the signal volume of the previous frame signal based on the volume level.
[0115] The signal volume of the previous frame signal is adjusted based on the volume level. This implementation can reduce user operations and improve user experience by adaptively adjusting the signal volume.
[0116] In one feasible implementation, the process of adjusting the signal volume of the previous frame signal based on the volume level may be: using the volume level as the signal volume of the previous frame signal; in another feasible implementation, when the volume level is greater than the signal volume of the previous frame signal, adjusting the signal volume of the previous frame signal, wherein the signal volume of the previous frame signal is greater than the volume level after adjustment.
[0117] In this embodiment, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained, and the signal parameters of the previous frame signal are determined based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to fundamental waves when the speaker reproduces the previous frame signal; the current frame signal is processed by linear parameters to obtain a linear signal, and the linear signal is processed by nonlinear parameters to obtain a nonlinear signal; the nonlinear signal is limited to obtain a target signal, so as to drive the speaker to sound according to the target signal. In this embodiment, by performing limiting processing after nonlinear filtering, the actual linear displacement and actual nonlinear displacement of the limiting signal are achieved, thereby reducing the distortion of the speaker.
[0118] In one possible implementation, referring to Figure 3 In this embodiment, adaptive volume adjustment is performed by detecting whether the current volume level is greater than or equal to 10 (i.e., the preset volume) or the gain is greater than or equal to -3 (i.e., the preset gain) through the soc (System on-a-Chip), that is, detecting whether the previous frame signal meets the preset volume condition through the soc.
[0119] If the current volume level is greater than or equal to 10 or the gain is greater than or equal to -3, it is determined that the speaker is in a high volume state. At this time, an intelligent voice reminder is given to remind the user that the volume is high at this time and ask whether to turn on the non-linear compensation mode; if the current volume level is less than 10 and the gain is less than -3, the non-linear compensation mode is not turned on, and the sound source signal is directly output to both ends of the speaker and played through the speaker.
[0120] Detect whether the user chooses to turn on the nonlinear compensation mode. If the user chooses yes, the nonlinear compensation module algorithm is turned on, and the processed signal is output to the speaker after nonlinear compensation processing and played through the speaker; if the user chooses no, the nonlinear compensation mode is not turned on at this time, and the sound source signal is directly output to both ends of the speaker and played through the speaker.
[0121] Further, based on the above first embodiment, a second embodiment of the signal processing method of the present invention is proposed. In this embodiment, before step S30, the method further includes:
[0122] Step S80, detecting whether the signal voltage of the nonlinear signal is within a preset voltage range;
[0123] In this embodiment, it is detected whether the signal voltage of the nonlinear signal is within a preset voltage range.
[0124] In this embodiment, the step S30 includes:
[0125] Step S301: If the signal voltage is not within the voltage range, limiting the nonlinear signal to obtain a target signal.
[0126] If the signal voltage is not within the voltage range, it is determined that the nonlinear signal after the nonlinear compensation processing may still cause nonlinear distortion of the loudspeaker. At this time, the nonlinear signal is limited to obtain the target signal.
[0127] This embodiment achieves limiting the fundamental wave part and the harmonic wave part when the loudspeaker reproduces the current frame signal, limits the actual linear displacement and the actual nonlinear displacement of the current frame signal, and further reduces the distortion of the loudspeaker.
[0128] Further, in a feasible implementation manner, the step S20 includes:
[0129] Step S201, calculating the theoretical linear displacement caused by the current frame signal based on the linear parameters;
[0130] In this implementation, the theoretical linear displacement caused by the current frame signal is calculated based on the linear parameters, wherein the theoretical linear displacement is the displacement of the voice coil caused by the current frame signal under the condition that the speaker does not distort. The specific method of calculating the theoretical linear displacement based on the linear parameters is not described in detail here.
[0131] Step S202: adjusting the voltage of the current frame signal according to the theoretical linear displacement to obtain a linear signal, wherein the actual linear displacement caused by the current frame signal is consistent with the theoretical linear displacement.
[0132] The voltage of the current frame signal is adjusted according to the theoretical linear displacement to obtain a linear signal, so that the actual linear displacement generated when the speaker reproduces the current frame sound signal is consistent with the theoretical linear displacement, thereby improving the output sound quality of the speaker and extending the service life of the speaker.
[0133] Further, in a feasible implementation manner, the step S20 includes:
[0134] Step S203, using the nonlinear parameters as filter coefficients of a nonlinear filter of the loudspeaker to obtain a target filter;
[0135] In this implementation, the nonlinear parameters are used as filter coefficients of the nonlinear filter of the speaker to obtain the target filter. Specifically, the nonlinear filter can be an extended Kalman filter (EKF, Extended Kalman Filter), a lossless Kalman filter (UKF, Unscented Kalman Filter), a particle filter (PF, Particle Filter) and other filters, which are not specifically limited here.
[0136] Step S204: Inverse filtering the linear signal through the target filter to obtain a nonlinear signal.
[0137] The linear signal is inversely filtered through the target filter, that is, the frequency response of the linear signal is modified through the target filter to obtain the target signal, so as to eliminate the harmonic part generated when the speaker reproduces the current frame signal.
[0138] Furthermore, in a feasible implementation, after obtaining the linear signal, the linear displacement caused by the linear signal can also be obtained, and the estimated linear displacement caused by the current frame signal can be determined based on the preset basic parameters; if the linear displacement of the linear signal is detected to be greater than the estimated linear displacement, it is determined that the amplitude of the linear signal exceeds the maximum amplitude range allowed by the speaker, and the speaker will still be distorted at this time, and the linear signal is limited at this time, and the linear signal after the limited processing is subjected to the step of nonlinear filtering of the linear signal through nonlinear parameters to obtain the target signal. This implementation realizes the limiting of the fundamental wave part when the speaker reproduces the current frame signal, so that the actual linear displacement of the current frame signal does not exceed the allowable range of the speaker, thereby reducing the distortion of the speaker.
[0139] In this embodiment, by detecting whether the signal voltage of the nonlinear signal is within a preset voltage range; if the signal voltage is not within the voltage range, the step of performing amplitude limiting processing on the nonlinear signal to obtain the target signal is performed. This embodiment achieves amplitude limiting of the fundamental wave part and the harmonic wave part when the speaker reproduces the current frame signal, limits the actual linear displacement and the actual nonlinear displacement of the current frame signal, and further reduces the speaker distortion.
[0140] Further, in one possible implementation, referring to Figure 4 , the specific processing process of nonlinear compensation can be:
[0141] The feedback voltage (V output by the AMP) and feedback current (I output by the AMP) of the previous frame signal after signal amplification by the power amplifier (AMP) are obtained, and the feedback current and feedback voltage are output to the impedance identification system (Nonlinear inpedance identification) to obtain signal parameters (Parameters), including linear parameters and nonlinear parameters.
[0142] The linear displacement model is modified by linear parameters, and the nonlinear filter is modified by nonlinear parameters (nonlinear inverse model) to obtain the target nonlinear filter. The signal parameters are returned to the temperature tracking module (temperature tracking), and the gain of the gainer (gain) is reset based on the result of the temperature tracking module to protect the speaker from temperature.
[0143] The current frame signal (ie, audio source) is input into the equalizer (ie, EQ, Equalize) and the gain amplifier after the gain is reset for audio processing.
[0144] The modified linear displacement module is used to adjust the current frame signal after the sound effect processing to obtain a linear signal, and the linear signal is processed by a target linear filter to obtain a nonlinear signal.
[0145] The nonlinear signal is limited by a limiter to obtain a target signal, which is amplified by a power amplifier and then output to a speaker for playback.
[0146] In addition, the embodiment of the present invention also provides a signal processing device, referring to Figure 5 , the signal processing device comprises:
[0147] An acquisition module 10 is used to acquire feedback circuit parameters of a previous frame signal of a current frame signal, and determine signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to the fundamental wave when the speaker reproduces the previous frame signal;
[0148] A processing module 20, configured to process the current frame signal by using the linear parameter to obtain a linear signal, and to process the linear signal by using the nonlinear parameter to obtain a nonlinear signal;
[0149] The processing module 20 is further used to perform limiting processing on the nonlinear signal to obtain a target signal, so as to drive the speaker to produce sound according to the target signal.
[0150] Furthermore, the signal processing device further includes a detection module, which is used to:
[0151] Detecting whether the signal voltage of the nonlinear signal is within a preset voltage range;
[0152] The processing module 20 is further used for:
[0153] If the signal voltage is not within the voltage range, the nonlinear signal is subjected to amplitude limiting processing to obtain a target signal.
[0154] Furthermore, the processing module 20 is also used for:
[0155] Calculating a theoretical linear displacement caused by the current frame signal based on the linear parameter;
[0156] The voltage of the current frame signal is adjusted according to the theoretical linear displacement to obtain a linear signal, wherein the actual linear displacement caused by the current frame signal is consistent with the theoretical linear displacement.
[0157] Furthermore, the processing module 20 is also used for:
[0158] Using the nonlinear parameters as filter coefficients of a nonlinear filter of the loudspeaker to obtain a target filter;
[0159] The linear signal is inversely filtered by the target filter to obtain a nonlinear signal.
[0160] Furthermore, the detection module is also used for:
[0161] Detecting whether the speaker is in a high volume state, wherein the high volume state is a state in which the volume of a signal input to the speaker is greater than a preset volume range;
[0162] If the speaker is in the high volume state, detecting whether an instruction to start nonlinear compensation processing is received;
[0163] The acquisition module 10 is also used for:
[0164] If the start instruction is received, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained.
[0165] Furthermore, the detection module is also used for:
[0166] Detecting whether the previous frame signal meets a preset volume condition, wherein the volume condition is that the signal volume is less than a preset volume and the signal gain is less than a preset gain;
[0167] If the previous frame signal does not meet the volume condition, it is determined that the speaker is in the high volume state.
[0168] Furthermore, the detection module is also used for:
[0169] Acquire an ambient sound signal of the external environment in which the speaker is located, and determine a volume level of the ambient sound signal;
[0170] The signal volume of the previous frame signal is adjusted based on the volume level.
[0171] The various embodiments of the signal processing device of the present invention may refer to the various embodiments of the signal processing method of the present invention, which will not be described in detail here.
[0172] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a signal processing program is stored. When the signal processing program is executed by a processor, the steps of the signal processing method described below are implemented.
[0173] The various embodiments of the signal processing device and the computer-readable storage medium of the present invention may refer to the various embodiments of the signal processing method of the present invention, which will not be described in detail here.
[0174] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0175] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0176] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0177] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A signal processing method, characterized in that: The signal processing method comprises the following steps: Acquire feedback circuit parameters of a previous frame signal of a current frame signal, and determine signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to the fundamental wave when the speaker reproduces the previous frame signal; Processing the current frame signal by the linear parameter to obtain a linear signal, and processing the linear signal by the nonlinear parameter to obtain a nonlinear signal; The nonlinear signal is subjected to amplitude limiting processing to obtain a target signal, so as to drive a loudspeaker to produce sound according to the target signal.
2. The signal processing method according to claim 1, characterized in that: Before the step of performing amplitude limiting processing on the nonlinear signal to obtain a target signal, the method further includes: Detecting whether the signal voltage of the nonlinear signal is within a preset voltage range; The step of performing amplitude limiting processing on the nonlinear signal to obtain a target signal comprises: If the signal voltage is not within the voltage range, the nonlinear signal is subjected to amplitude limiting processing to obtain a target signal.
3. The signal processing method according to claim 1, characterized in that: The step of processing the current frame signal by using the linear parameter to obtain a linear signal comprises: Calculating a theoretical linear displacement caused by the current frame signal based on the linear parameter; The voltage of the current frame signal is adjusted according to the theoretical linear displacement to obtain a linear signal, wherein the actual linear displacement caused by the current frame signal is consistent with the theoretical linear displacement.
4. The signal processing method according to claim 1, characterized in that: The step of processing the linear signal by using the nonlinear parameter to obtain a nonlinear signal comprises: Using the nonlinear parameters as filter coefficients of a nonlinear filter of the loudspeaker to obtain a target filter; The linear signal is inversely filtered by the target filter to obtain a nonlinear signal.
5. The signal processing method according to any one of claims 1 to 4, characterized in that: Before the step of obtaining the feedback circuit parameters of the previous frame signal of the current frame signal, the method further includes: Detecting whether the speaker is in a high volume state, wherein the high volume state is a state in which the volume of a signal input to the speaker is greater than a preset volume range; If the speaker is in the high volume state, detecting whether an instruction to start nonlinear compensation processing is received; The step of obtaining the feedback circuit parameters of the previous frame signal of the current frame signal includes: If the start instruction is received, the feedback circuit parameters of the previous frame signal of the current frame signal are obtained.
6. The signal processing method according to claim 5, characterized in that: The step of detecting whether the speaker is in a high volume state comprises: Detecting whether the previous frame signal meets a preset volume condition, wherein the volume condition is that the signal volume is less than a preset volume and the signal gain is less than a preset gain; If the previous frame signal does not meet the volume condition, it is determined that the speaker is in the high volume state.
7. The signal processing method according to claim 5, characterized in that: Before the step of detecting whether the speaker is in a high volume state, the method further includes: Acquire an ambient sound signal of the external environment in which the speaker is located, and determine a volume level of the ambient sound signal; The signal volume of the previous frame signal is adjusted based on the volume level.
8. A signal processing device, characterized in that: The signal processing device comprises: An acquisition module, used to acquire feedback circuit parameters of a previous frame signal of a current frame signal, and determine signal parameters of the previous frame signal based on the feedback circuit parameters, wherein the signal parameters include nonlinear parameters corresponding to harmonics when the speaker reproduces the previous frame signal, and linear parameters corresponding to fundamental waves when the speaker reproduces the previous frame signal; A processing module, configured to process the current frame signal by using the linear parameter to obtain a linear signal, and to process the linear signal by using the nonlinear parameter to obtain a nonlinear signal; The processing module is further used to perform limiting processing on the nonlinear signal to obtain a target signal, so as to drive the speaker to produce sound according to the target signal.
9. A signal processing device, characterized in that: The signal processing device comprises: a memory, a processor, and a signal processing program stored in the memory and executable on the processor, wherein the signal processing program implements the steps of the signal processing method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a signal processing program, and when the signal processing program is executed by a processor, the steps of the signal processing method according to any one of claims 1 to 7 are implemented.
