Acoustic simulation method and device, equipment and storage medium

By optimizing IIR filter parameters and employing various simulation methods, the problem that existing acoustic simulation tools cannot directly process audio signals has been solved, achieving complete simulation of audio signals and improving the accuracy of sound quality reflection and the ability to capture nonlinear distortion.

CN121787036APending Publication Date: 2026-04-03WUXI RUIQIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing acoustic simulation tools cannot directly simulate audio signals, ignoring the specific waveform and dynamic changes of the signal, and cannot accurately reflect the actual sound quality or capture nonlinear distortion.

Method used

By acquiring simulation parameters and audio data, and using T/S parameters and structural parameters for simulation, the IIR filter parameters are optimized to match the target frequency response curve, thus obtaining the target audio in the time domain. By combining finite element simulation, electro-acoustic analog equivalent circuit simulation, and transfer matrix simulation methods, the complete simulation processing of the audio signal is achieved.

Benefits of technology

It achieves complete simulation of audio signals, accurately reflects actual sound quality, reduces nonlinear distortion, and improves the accuracy and effectiveness of acoustic simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787036A_ABST
    Figure CN121787036A_ABST
Patent Text Reader

Abstract

The invention provides an acoustic simulation method and device, equipment and a storage medium, and the method comprises the steps: obtaining simulation parameters, audio data and a target frequency response curve, the simulation parameters comprise T / S parameters and structural parameters, and the structural parameters comprise any one of the following structural parameters: a loudspeaker monomer, a loudspeaker module and a complete machine product; according to the T / S parameters and the structure parameters, a simulation frequency response curve is obtained through a simulation method; according to the target frequency response curve, IIR filter parameters are changed through an optimization algorithm to optimize the simulation frequency response curve, and an optimized simulation frequency response curve and optimized IIR filter parameters are obtained; and processing the audio data according to the filter parameters or the optimized frequency response curve to obtain a time-domain target audio. Through the method, the device, the module and the whole machine can be simulated, the audio data optimized by the filter under the simulation structure can be obtained, and a complete simulation processing process of the audio data is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of acoustic simulation, and more particularly to a method, apparatus, device, and storage medium for acoustic simulation. Background Technology

[0002] In the process of acoustic product development, acoustic engineers typically use simulation to obtain the acoustic performance of devices, modules, and the entire device before formal development. Through simulation, a preliminary understanding of the acoustic performance of devices, modules, and the entire device can be obtained without prototyping, thus providing theoretical support for the selection of devices and modules, as well as the evaluation of the acoustic performance of the entire device.

[0003] Most simulation tools on the market simulate individual devices, modules, or complete products to obtain their frequency response curves. While simulation can generate frequency response curves for devices, modules, and complete products and optimize device structures accordingly, these curves only reflect the device's response characteristics to audio signals and do not directly simulate the audio signals themselves.

[0004] Without simulating the audio signal itself, the effects of the signal's specific waveform and dynamic changes are ignored, which may fail to accurately reflect the actual sound quality and capture problems such as nonlinear distortion encountered in real-world use. Therefore, how to simulate and process a set of audio signals is an urgent problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for acoustic simulation, used to perform simulation processing of audio signals in acoustic simulation.

[0006] In a first aspect, this application provides a method for acoustic simulation, the method comprising:

[0007] Acquire simulation parameters, audio data, and target frequency response curves. The simulation parameters include T / S parameters and structural parameters. The structural parameters include any one of the following: structural parameters of the speaker unit, structural parameters of the speaker module, and structural parameters of the complete product.

[0008] Based on the T / S parameters and the structural parameters, simulation results are obtained through a preset simulation method, wherein the simulation results include the simulation frequency response curve;

[0009] Based on the target frequency response curve, the preset IIR filter parameters are changed through a preset optimization algorithm to optimize the simulated frequency response curve, resulting in an optimized simulated frequency response curve and optimized IIR filter parameters. The similarity between the optimized simulated frequency response curve and the target frequency response curve satisfies a preset condition.

[0010] The audio data is processed according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain.

[0011] Optionally, the step of optimizing the simulated frequency response curve by changing the preset parameters of the IIR filter using the optimization algorithm based on the target frequency response curve, to obtain the optimized simulated frequency response curve and the optimized IIR filter parameters, includes:

[0012] Determine the difference curve based on the target frequency response curve and the simulated frequency response curve;

[0013] Based on the difference curve, N IIR filters are determined;

[0014] The optimization algorithm is used to optimize each IIR filter parameter so that the similarity between the target frequency response curve and the optimized simulated frequency response curve meets a preset condition, resulting in N optimized IIR filter parameters.

[0015] Optionally, processing the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain includes:

[0016] The parameters of the filter bank are obtained by cascading N optimized filter parameters.

[0017] The audio data is input into the filter group to obtain the target audio in the time domain.

[0018] Optionally, processing the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain includes:

[0019] The audio data is then subjected to a Fast Fourier Transform to obtain frequency domain audio data.

[0020] The optimized simulated frequency response curve in logarithmic form is then transformed into a linear frequency response curve.

[0021] At each frequency component, the signal value of the frequency domain audio data is multiplied by the signal value of the linear frequency response curve to obtain the processed frequency domain audio data.

[0022] The processed frequency domain audio data is converted by inverse fast Fourier transform to obtain the target audio in the time domain.

[0023] Optionally, the method further includes:

[0024] The target audio in the time domain is played through a high-fidelity device.

[0025] Optionally, the simulation method may be any of the following: finite element simulation method, electro-mechanical-acoustic analog equivalent circuit simulation method, or transfer matrix simulation method.

[0026] Optionally, the structural parameters of the speaker module are any of the following structural parameters:

[0027] Speaker driver and rear chamber; speaker driver and front chamber; speaker driver, rear chamber and front chamber; speaker driver, rear chamber, front chamber and slit; speaker driver, rear chamber, front chamber, slit and sound hole.

[0028] Secondly, this application also provides an acoustic simulation apparatus, the apparatus comprising:

[0029] The acquisition module is used to acquire simulation parameters, audio data and target frequency response curves. The simulation parameters include T / S parameters and structural parameters. The structural parameters include any one of the following: structural parameters of the speaker unit, structural parameters of the speaker module and structural parameters of the complete product.

[0030] The simulation module is used to obtain simulation results based on the T / S parameters and the structural parameters using a preset simulation method, wherein the simulation results include a simulation frequency response curve;

[0031] An optimization module is used to optimize the simulated frequency response curve by changing the parameters of a preset IIR filter according to the target frequency response curve through the optimization algorithm, thereby obtaining the optimized simulated frequency response curve and the optimized IIR filter parameters, wherein the similarity between the optimized simulated frequency response curve and the target frequency response curve satisfies a preset condition.

[0032] The processing module is used to process the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain.

[0033] Thirdly, this application also provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0034] The memory stores computer-executed instructions;

[0035] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.

[0036] Fourthly, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.

[0037] This application provides a method, apparatus, device, and storage medium for acoustic simulation. The method includes: acquiring simulation parameters, audio data, and a target frequency response curve. The simulation parameters include T / S parameters and structural parameters. The structural parameters include any one of the following: structural parameters of a speaker unit, structural parameters of a speaker module, and structural parameters of the complete product. Based on the T / S parameters and structural parameters, a simulation result is obtained through a preset simulation method, wherein the simulation result includes a simulation frequency response curve. Based on the target frequency response curve, preset IIR filter parameters are changed through an optimization algorithm to optimize the simulation frequency response curve, resulting in an optimized simulation frequency response curve and optimized IIR filter parameters. The similarity between the optimized simulation frequency response curve and the target frequency response curve satisfies a preset condition. The audio data is processed based on the filter parameters or the optimized frequency response curve to obtain the target audio in the time domain. Through the above method, devices, modules, and complete products can be simulated, and audio data optimized by filters under the simulated structure can be obtained, providing a complete simulation processing procedure for audio data. Attached Figure Description

[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0039] Figure 1 A flowchart illustrating an embodiment of the acoustic simulation method provided in this application;

[0040] Figure 2 The underlying logic diagram for the simulation provided in this application;

[0041] Figure 3 A flowchart illustrating Embodiment 2 of the acoustic simulation method provided in this application;

[0042] Figure 4 A flowchart illustrating Embodiment 3 of the acoustic simulation method provided in this application;

[0043] Figure 5 A flowchart illustrating Embodiment 4 of the acoustic simulation method provided in this application;

[0044] Figure 6 A schematic diagram of a web-based implementation architecture provided in this application;

[0045] Figure 7 A schematic diagram of the simulated frequency response curves of a device, module, and complete machine provided for this application;

[0046] Figure 8 A schematic diagram of harmonic distortion in a device, module, and complete machine provided for this application;

[0047] Figure 9A schematic diagram of the simulated frequency response curve before and after optimization, provided for this application;

[0048] Figure 10 A schematic diagram of the structure of an embodiment of an acoustic simulation device provided in this application;

[0049] Figure 11 A schematic diagram of the structure of the electronic device provided in this application.

[0050] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0051] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0052] In the field of acoustic simulation, the simulation tools on the market are designed to simulate individual devices, modules, or complete products. Developers need to learn and understand multiple simulation software programs, which is very inconvenient. Furthermore, when a structural parameter needs to be changed, the device, module, and complete product need to be simulated again, which is cumbersome.

[0053] In addition, although simulation can generate frequency response curves for devices, modules and complete products and optimize device structures accordingly, the frequency response curves only reflect the device's response characteristics to audio signals and do not directly simulate the audio signals themselves.

[0054] Not simulating the audio signal itself may have the following drawbacks:

[0055] 1. Frequency response curves only show the device's response to different frequencies, without considering the specific waveform and dynamic changes of the signal, and may not accurately reflect the actual sound quality.

[0056] 2. Relying solely on frequency response cannot capture complex signal processing issues such as nonlinear distortion and phase response in practical applications.

[0057] 3. Different processing and output methods for audio signals may produce different effects. The subsequent processing methods were not simulated, and an important part of the audio output was ignored.

[0058] In view of this, the inventors discovered during their research in this field that by constructing a simulation software that integrates a single device, module, and complete machine, the user inputs the parameters to be simulated and audio data. The simulation results are first optimized using a filter. Once the optimization reaches the expected level, the audio data is processed using the optimized filter parameters or the optimized frequency response curve to obtain the audio data for playback timing. At this point, the simulation obtains the output of the structural parameters to be simulated after inputting audio, completing the final step of the simulation. The user can then play the simulated audio data to assess the sound quality. Based on this, this application proposes a method, apparatus, device, and storage medium for acoustic simulation.

[0059] This application can be set up on a cloud server to provide online services to multiple users, or it can be set up on a user's local terminal.

[0060] The following describes the technical solution of this application and how it solves the aforementioned technical problems using specific embodiments, with cloud servers as the execution entity. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0061] Figure 1 A flowchart illustrating an embodiment of the acoustic simulation method provided in this application is shown below. Figure 1 As shown, the method includes the following steps:

[0062] S101. Obtain simulation parameters, audio data, and target frequency response curves. Simulation parameters include T / S parameters and structural parameters. Structural parameters include any of the following: structural parameters of the speaker unit, structural parameters of the speaker module, and structural parameters of the complete product.

[0063] In this step, the user inputs the simulation parameters, audio data, and target frequency response curve into the client on the cloud server. The client then sends these parameters, audio data, and target frequency response curve to the cloud server. The target frequency response curve is a set of data or a file input by the user. The simulation parameters include T / S parameters, structural parameters, and optimization algorithms. The audio data input by the user is time-domain audio data.

[0064] In one specific implementation, the client may offer multiple options. The user needs to select the simulated speaker unit, device module, or complete product. After selection, a structural parameter input box will pop up for the user to input. For example... Figure 2 As shown, Figure 2This is a schematic diagram of the underlying simulation logic provided for this application. For device modules, users are offered several options: speaker driver and rear cavity; speaker driver and front cavity; speaker driver, rear cavity, and front cavity; speaker driver, rear cavity, front cavity, and slit; speaker driver, rear cavity, front cavity, slit, and sound outlet. Users can select any device module for simulation, or they can select a complete product, including but not limited to smart speakers, laptops, mobile phones, TWS earphones, tablets, etc. Optionally, users can also select any of the following functions on the client side: Equalization (EQ), Active Noise Cancellation (ANC), Head Tracking (HT), etc. For example, in the ANC function, generating inverse sound waves reduces the impact of environmental noise on audio, helping to consider noise interference in the actual usage environment during simulation and improving simulation accuracy.

[0065] The T / S parameters include at least the following: 1. Voice coil DC resistance Re; 2. Coil BL value, i.e., magnetic force conversion factor; 3. Effective projected area of ​​diaphragm Sd; 4. Force compliance of the vibration system Cms; 5. Mechanical mass including speaker enclosure and air load Mms; 6. Force resistance of the vibration system Rms; 7. Inductance Le.

[0066] S102. Based on the T / S parameters and structural parameters, obtain simulation results through a preset simulation method. The simulation results include the simulation frequency response curve.

[0067] In this step, various simulation methods can be used, such as finite element simulation, electro-mechanical-acoustic analog equivalent circuit simulation, and transfer matrix simulation. Equivalent circuit simulation is a commonly used method due to its fast computation speed, while finite element simulation has a wide range of applications. Alternatively, a two-port network transfer matrix can be used to represent each step of the transformation process in the acoustic system. Multiplying all transformations yields the final transfer matrix, also known as the transition matrix, which represents the mapping relationship between the initial and final inputs of the loudspeaker. The simulation results can be obtained based on the parameters required in the transfer matrix. The transfer matrix is ​​calculated by multiplying the electrical terminal matrix, gyrator matrix, mechanical terminal matrix, variable terminal matrix, and acoustic terminal matrix to obtain a second-order matrix.

[0068] Using any of the above simulation methods, the simulation results can be determined based on the T / S parameters and structural parameters. The simulation results include the simulated frequency response curve, simulated impedance curve, simulated displacement curve, and simulated distortion curve.

[0069] It should be noted that the input voltage of the device is also required during the simulation process. Different input voltages will result in different frequency response curves. In this application, simulations can be performed under different input voltages or under a preset voltage (e.g., the rated voltage). No restrictions are imposed here.

[0070] S103. Based on the target frequency response curve, the preset IIR filter parameters are changed through a preset optimization algorithm to optimize the simulated frequency response curve, thereby obtaining the optimized simulated frequency response curve and the optimized IIR filter parameters. The similarity between the optimized simulated frequency response curve and the target frequency response curve meets the preset conditions.

[0071] After obtaining the simulation results, the simulated frequency response curve may not meet the user's needs. This can be optimized using an optimization algorithm, i.e., by changing the set filter parameters. The preset optimization algorithm can be any of the following: genetic algorithm, simulated annealing algorithm, or particle swarm optimization algorithm.

[0072] A filter allows specific frequency components of a signal to pass through while significantly attenuating other frequency components, thus enabling the electronic device to achieve the desired output. For example, in acoustic products, since a sound conforming to the Harman curve is smoother and of higher quality, it is desirable for the product's output frequency response curve to resemble the Harman curve. This is achieved by setting and adjusting the filter to make the output frequency response curve resemble the Harman curve. The filter is pre-set to use an Infinite Impulse Response (IIR) digital filter.

[0073] The target frequency response curve is the desired curve pre-input by the user. It can be a Harman curve, an Etymotic curve, or a desired curve set as needed. This application does not limit the target frequency response curve. It can be any curve that can reflect the relationship between frequency and response and can further convert the corresponding coordinates into frequency power.

[0074] The filter parameters are adjusted by an optimization algorithm to optimize the simulated frequency response curve, aiming at the target frequency response curve. The goal is to ensure that the similarity between the optimized simulated frequency response curve and the target frequency response curve meets a preset condition, which can be a similarity value greater than a certain threshold. The filter can be a pre-set IIR filter type (such as Lowshelf, Highshelf, Peak, etc.) or an IIR filter type determined based on frequency (e.g., selecting different IIR filter types for different frequency bands).

[0075] In one specific implementation, an objective function is defined to quantify the difference between the target frequency response curve and the optimized simulated frequency response curve. The objective function may include the root mean square value of the error between the two or other similarity metrics. The optimization algorithm adjusts the center frequency of the filter so that the frequency response curve approaches the target curve within the desired frequency range; the optimization algorithm controls the bandwidth and peak width of the filter by adjusting the Q parameter to match the shape and bandwidth of the target curve. The optimization algorithm adjusts the gain G parameter of the filter to ensure that the amplitude of the frequency response curve in the target frequency band is consistent with the desired value. The frequency, quality factor Q, and gain G are dynamically adjusted to minimize the objective function, achieving optimal frequency response matching.

[0076] It should be noted that, in the context of filter and frequency response curve optimization, gain G refers to the amplitude amplification factor of the input signal by the filter. Gain can be expressed in decibels (dB) or as a linear value.

[0077] S104. Process the audio data according to the optimized filter parameters or the optimized simulation frequency response curve to obtain the target audio in the time domain.

[0078] In one approach, audio data can be processed using optimized simulated frequency response curves.

[0079] In another approach, audio data can be processed using optimized filter parameters.

[0080] The specific implementation methods of the two approaches will be described in subsequent embodiments.

[0081] Optionally, after obtaining the target audio in the time domain, the audio data can be played through a high-fidelity device for users to listen to and check whether it meets their needs.

[0082] This embodiment provides a method for acoustic simulation, which includes: acquiring simulation parameters, audio data, and a target frequency response curve. The simulation parameters include T / S parameters and structural parameters, and the structural parameters include any one of the following: structural parameters of a speaker unit, structural parameters of a speaker module, and structural parameters of the entire product; obtaining simulation results based on the T / S parameters and structural parameters using a preset simulation method, wherein the simulation results include a simulation frequency response curve; optimizing the simulation frequency response curve by changing preset IIR filter parameters using a preset optimization algorithm, thereby obtaining an optimized simulation frequency response curve and optimized IIR filter parameters, wherein the similarity between the optimized simulation frequency response curve and the target frequency response curve meets a preset condition; and processing the audio data based on the filter parameters or the optimized frequency response curve to obtain the target audio in the time domain. Through the above method, audio data optimized by filters under a simulated structure can be obtained, providing a complete simulation processing procedure for audio data.

[0083] The following example illustrates how to specifically optimize the simulated frequency response curve to obtain the optimized simulated frequency response curve and optimized filter parameters.

[0084] Figure 3 A flowchart illustrating Embodiment Two of the acoustic simulation method provided in this application is shown below. Figure 3 As shown, it includes the following steps:

[0085] S201. Determine the difference curve based on the target frequency response curve and the simulated frequency response curve.

[0086] The difference curve reflects the difference between the target frequency response curve and the simulated frequency response curve.

[0087] In some embodiments, the difference curve can be the curve obtained by subtracting the simulated frequency response curve from the target frequency response curve.

[0088] S202. Based on the difference curve, determine N IIR filters.

[0089] In one implementation, the difference curve is divided into at least one segment by using the zero point of the difference curve, with each segment corresponding to an IIR filter. The initial parameters (center frequency, bandwidth, gain) of each IIR filter are determined based on the frequency range and amplitude of each segment.

[0090] It should be noted that since the zero point can reflect the change in signal processing from attenuation to amplification on the difference frequency response curve, the zero point can more accurately divide the different frequency bands of the filter according to the filtering effect, so that the same frequency response curve segment has roughly the same filtering characteristics. This allows for a better use of a set of filter parameters to accurately achieve the corresponding filter effect, which helps to reduce the number of iterations and improve iteration efficiency.

[0091] In another implementation, since the difference curve may or may not have a zero, if no zero is found, the difference curve is shifted downwards along the vertical axis of the coordinate system until a zero is generated. The curve is then divided into multiple segments based on the shifted curve that produces the zero, with each segment corresponding to an IIR filter.

[0092] In another implementation, different horizontal lines are drawn on the difference curve. The horizontal line that intersects the difference curve the most is determined and used as the zero axis. The difference curve is then divided into different curve segments. Each curve segment corresponds to an IIR filter.

[0093] This allows the difference curve to identify more zeros compared to other cases, resulting in a larger number of IIR filters. This, in turn, makes it easier to optimize the simulation frequency response curve more accurately, obtain more accurate filter parameters, and improve the precision of the filter parameters.

[0094] In summary, the N IIR filters required are determined based on the difference curve. The initial parameters of each IIR filter can be determined according to the frequency range of each segment of the curve and the amplitude variation within that frequency range. Furthermore, IIR filters with different structures can be selected for different frequency bands.

[0095] S203. Optimize each IIR filter parameter through an optimization algorithm so that the similarity between the target frequency response curve and the optimized simulated frequency response curve meets the preset conditions, and obtain N optimized IIR filter parameters.

[0096] In this step, each IIR filter parameter is optimized using any one of the user-selected or preset optimization algorithms, such as genetic algorithm, simulated annealing algorithm, or particle swarm optimization algorithm, until the similarity between the target frequency response curve and the optimized simulated frequency response curve reaches a preset threshold. After adjusting the filter parameters until the similarity between the target frequency response curve and the optimized simulated frequency response curve meets the threshold, the optimization iteration ends, resulting in N optimized IIR filter parameters and optimized simulated frequency response curves.

[0097] For example, Table 1 is a set of IIR filter coefficients provided in this application, and four IIR filters are shown in Table 1.

[0098] b0 b1 b2 a0 a1 a2 filter1 1.004873 -1.97919 0.974711 1 -1.9793 0.97948 filter2 0.991851 -1.94712 0.95737 1 -1.94712 0.949221 filter3 1.361273 -1.59698 0.462278 1 -1.59698 0.823551 filter4 0.559798 0.483301 -0.03773 1 0.397485 -0.39212

[0099] Where b represents the forward coefficient, which determines the location of the zeros of the filter, and a represents the feedback coefficient, which determines the location of the poles of the filter.

[0100] This embodiment provides a method for acoustic simulation. Based on the target frequency response curve and the simulated frequency response curve, a difference curve is determined. Based on the difference curve, N IIR filters are determined. The parameters of each IIR filter are optimized using an optimization algorithm so that the similarity between the target frequency response curve and the optimized simulated frequency response curve meets a preset condition, resulting in N optimized IIR filter parameters. In this way, the number of filters is related to the difference curve; the number of filters is determined by the zero point of the difference curve, ensuring that filters within the same frequency response curve segment have approximately the same filtering characteristics, thus improving optimization efficiency.

[0101] Based on the above embodiment 2, if N optimized filter parameters are obtained, the audio data is processed through the following embodiments.

[0102] Figure 4 A flowchart illustrating Embodiment 3 of the acoustic simulation method provided in this application is shown below. Figure 4 As shown, it includes the following steps:

[0103] S204. The parameters of the filter bank are obtained by cascading the N optimized filter parameters.

[0104] Each filter's parameters include its forward coefficients (numerator coefficients) and feedback coefficients (denominator coefficients). N IIR filters are connected in frequency order to form a filter bank. The output of each filter serves as the input to the next. For the first filter, its optimized coefficients are used to calculate its output signal, and the output of the first filter becomes the input to the second filter, and so on, until all N filters have been processed.

[0105] During implementation, cascading connections can be achieved using a direct type or other structures.

[0106] S205. Input the audio data into the filter bank to obtain the target audio in the time domain.

[0107] The prepared audio data is sequentially input into the first filter of the filter bank. Each filter processes the input signal according to its parameters and then passes the processed signal to the next filter. After processing by the cascaded filter bank, the desired time-domain target audio is obtained.

[0108] In this embodiment, by processing audio data using N optimized filter parameters, optimized audio data can be obtained under a simulated structure. Based on the final target audio, the specific waveform and dynamic changes of the audio signal can be viewed, and the actual sound quality can be directly listened to. Furthermore, multi-level filter settings can reduce nonlinear distortion and phase distortion; by filtering across multiple frequency bands, the characteristics of the output signal can be controlled more precisely.

[0109] Based on Example 2 or Example 1, audio data can also be processed using the optimized simulated frequency response curve. An example will be described below.

[0110] Figure 5 A flowchart illustrating Embodiment 4 of the acoustic simulation method provided in this application is shown below. Figure 5 As shown, it includes the following steps:

[0111] S301. Obtain frequency domain audio data by performing a fast Fourier transform on the audio data.

[0112] In this step, the audio data is a time-domain audio signal, which can be decomposed into frequency components using the Fast Fourier Transform (FFT).

[0113] S302. Convert the optimized logarithmic simulation frequency response curve into a linear frequency response curve.

[0114] In general, frequency response curves are often represented in logarithmic form, which better reflects the human ear's perception of different frequencies. After converting the optimized simulated frequency response curve into a linear form, it can be easily multiplied frequency-by-frequency with the signal values ​​in the frequency domain audio data. This is because, in frequency domain processing, the linear frequency response curve can directly affect each frequency component.

[0115] S303. For each frequency component, multiply the signal value of the frequency domain audio data with the signal value of the linear frequency response curve to obtain the processed frequency domain audio data.

[0116] Frequency domain filtering can be achieved by multiplying each frequency component of the frequency domain audio data with the frequency response curve. This multiplication operation is the core of frequency domain filtering, capable of enhancing or attenuating components of specific frequencies to achieve the desired audio effect.

[0117] S304. The processed frequency domain audio data is converted by inverse fast Fourier transform to obtain the target audio in the time domain.

[0118] The final output audio signal usually needs to be played or further processed in the time domain. Therefore, the processed frequency domain signal is converted back to the time domain by using the inverse fast Fourier transform (IFFT) to obtain the target audio in the time domain.

[0119] This embodiment utilizes FFT to convert audio data to the frequency domain, facilitating frequency-related operations. In the frequency domain, the linear frequency response curve allows for precise control of the gain of different frequency components, thereby achieving the desired audio effect. FFT and IFFT efficiently convert between the time and frequency domains, ensuring accurate reconstruction of the processed audio signal. This process effectively filters, enhances, or adjusts other frequency characteristics of the audio signal, thus optimizing the final output audio effect.

[0120] The following section provides a detailed introduction to this solution using specific examples.

[0121] Figure 6 A schematic diagram illustrating a web-based implementation architecture provided in this application, such as... Figure 6As shown, the web interface includes a static file server for rendering the user interface and implementing front-end logic (Vue framework, HTML, CSS, JS); a database for storing user information, simulation data, reports, etc.; and an application server that provides a unified interface, processes client requests, executes business logic, and interacts with the database to obtain or store data. The main functions of the web interface are as follows: physical simulation, guided operation (providing user operation wizards to simplify the usage process), result visualization (displaying simulation results to users in charts or other visual forms), report generation, component library management (adding, deleting, and updating individual components), user feedback interaction, data statistics, and integration of physical simulation and algorithm design.

[0122] Simulation of underlying logic, such as Figure 2 As shown, the user inputs parameters for each module, i.e. Figure 2 The parameters for the lower-level modules include: T / S parameters, rear cavity structure parameters, front cavity structure parameters, slit structure parameters, and sound outlet structure parameters. After inputting the lower-level module parameters, the lower-level modules can be combined. Users can choose the combined module or the entire device to be simulated. The T / S parameters include individual small-signal parameters and large-signal parameters. The individual small-signal parameters are the constant parts of the T / S parameters, while the large-signal parameters are the variable parts.

[0123] The modular code programming approach is adopted to minimize redundancy, and physical simulation and algorithm design are seamlessly integrated and mutually invoked.

[0124] This platform can obtain device performance (frequency response, impedance, displacement, distortion) based on acoustic device parameters, then obtain module acoustic performance (frequency response, impedance, displacement, distortion) based on module acoustic structure design parameters, then obtain overall device acoustic performance (frequency response, impedance, displacement, distortion) based on overall device acoustic structure design parameters, and finally obtain the final overall device acoustic performance (frequency response, impedance, displacement, distortion) based on audio algorithms. The results of each process can be exported as a document report, or the audio can be played using high-fidelity equipment according to the final frequency response of the overall device to test the listening effect.

[0125] The simulation parameters of individual components input by the user can be used to obtain the sound pressure level (SPL) curves, i.e., the simulated frequency response curves, for individual components, modules, and the entire device. For example, Figure 7 This is a schematic diagram of the simulated frequency response curves of a device, module, and complete machine provided in this application. In other cases, the low-frequency part of the SPL complete machine overlaps with the SPL module, and the high-frequency part of the SPL module overlaps with the SPL device. Figure 8 This is a schematic diagram of harmonic distortion of a device, module, and complete machine provided in this application. The curves of the complete machine and the module basically overlap.

[0126] For the frequency response curve, the filter parameters can be adjusted through optimization algorithms to optimize the simulated frequency response curve. Figure 9 A schematic diagram of the simulated frequency response curve before and after optimization is provided for this application, as shown below. Figure 9 As shown, the solid line represents the target frequency response curve, the short dashed line represents the initial simulation frequency response curve, and the long dashed line represents the optimized frequency response curve. The figure shows that, for the low-frequency range, the optimized curve better matches the target frequency response curve.

[0127] The optimized filter parameters can be used in practical designs. These parameters can be used to process audio data, or processed using the optimized frequency response curve; further details will not be elaborated here.

[0128] The processed audio is played back using high-fidelity equipment, and the audio spectrum is displayed in real time.

[0129] This example demonstrates a simulation method that seamlessly integrates components, modules, complete systems, and algorithms. The results of each process can be exported as document reports, or the audio can be played back using high-fidelity equipment to test the final frequency response of the complete system. In the development of acoustic products such as speakers, laptops, mobile phones, and headphones, it is necessary to evaluate the acoustic performance of components, modules, and complete systems. Compared to other existing acoustic simulation tools, the acoustic simulation method described in this application can be deployed on a web-based platform. Based on the component parameters, module and complete system structural parameters, and corresponding audio algorithms provided by the user, the final acoustic performance of the product is obtained, improving development efficiency.

[0130] Figure 10 This is a schematic diagram of the structure of an embodiment of an acoustic simulation device provided in this application, as shown below. Figure 10 As shown, the acoustic simulation device 10 includes:

[0131] The acquisition module 101 is used to acquire simulation parameters, audio data and target frequency response curves. The simulation parameters include T / S parameters and structural parameters. The structural parameters include any one of the following: structural parameters of the speaker unit, structural parameters of the speaker module and structural parameters of the complete product.

[0132] The simulation module 102 is used to obtain simulation results based on the T / S parameters and the structural parameters using a preset simulation method, wherein the simulation results include a simulation frequency response curve;

[0133] The optimization module 103 is used to optimize the simulated frequency response curve by changing the parameters of a preset IIR filter according to the target frequency response curve through a preset optimization algorithm, so as to obtain the optimized simulated frequency response curve and the optimized IIR filter parameters, wherein the similarity between the optimized simulated frequency response curve and the target frequency response curve satisfies a preset condition.

[0134] The processing module 104 is used to process the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain.

[0135] Optionally, the optimization module 103 is specifically used for:

[0136] Determine the difference curve based on the target frequency response curve and the simulated frequency response curve;

[0137] Based on the difference curve, N IIR filters are determined;

[0138] The optimization algorithm is used to optimize each IIR filter parameter so that the similarity between the target frequency response curve and the optimized simulated frequency response curve meets a preset condition, resulting in N optimized IIR filter parameters.

[0139] Optionally, the processing module 104 is further configured to:

[0140] The parameters of the filter bank are obtained by cascading N optimized filter parameters.

[0141] The audio data is input into the filter group to obtain the target audio in the time domain.

[0142] Optionally, the processing module 104 is further configured to:

[0143] The audio data is then subjected to a Fast Fourier Transform to obtain frequency domain audio data.

[0144] The optimized simulated frequency response curve in logarithmic form is then transformed into a linear frequency response curve.

[0145] At each frequency component, the signal value of the frequency domain audio data is multiplied by the signal value of the linear frequency response curve to obtain the processed frequency domain audio data.

[0146] The processed frequency domain audio data is converted by inverse fast Fourier transform to obtain the target audio in the time domain.

[0147] Optionally, the device further includes a playback module 105 for playing the target audio in the time domain via a high-fidelity device.

[0148] Optionally, the simulation method may be any of the following: finite element simulation method, electro-mechanical-acoustic analog equivalent circuit simulation method, or transfer matrix simulation method.

[0149] Optionally, the structural parameters of the speaker module are any of the following structural parameters:

[0150] Speaker driver and rear chamber; speaker driver and front chamber; speaker driver, rear chamber and front chamber; speaker driver, rear chamber, front chamber and slit; speaker driver, rear chamber, front chamber, slit and sound hole.

[0151] Optionally, the optimization algorithm is any of the following: genetic algorithm, simulated annealing algorithm, or particle swarm optimization algorithm.

[0152] The acoustic simulation device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0153] Figure 11 A schematic diagram of the structure of the electronic device provided in this application. Figure 11 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0154] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0155] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0156] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0157] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0158] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0159] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0160] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0161] The aforementioned readable storage medium 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 storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0162] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0163] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0164] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0165] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0166] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0167] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0168] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for acoustic simulation, characterized in that, The method includes: Acquire simulation parameters, audio data, and target frequency response curves. The simulation parameters include T / S parameters and structural parameters. The structural parameters include any one of the following: structural parameters of the speaker unit, structural parameters of the speaker module, and structural parameters of the complete product. Based on the T / S parameters and the structural parameters, simulation results are obtained through a preset simulation method, wherein the simulation results include the simulation frequency response curve; Based on the target frequency response curve, the preset IIR filter parameters are changed through a preset optimization algorithm to optimize the simulated frequency response curve, resulting in an optimized simulated frequency response curve and optimized IIR filter parameters. The similarity between the optimized simulated frequency response curve and the target frequency response curve satisfies a preset condition. The audio data is processed according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain.

2. The method according to claim 1, characterized in that, The step of optimizing the simulated frequency response curve by changing the preset parameters of the IIR filter according to the target frequency response curve using the optimization algorithm, and obtaining the optimized simulated frequency response curve and optimized IIR filter parameters, includes: Determine the difference curve based on the target frequency response curve and the simulated frequency response curve; Based on the difference curve, N IIR filters are determined; The optimization algorithm is used to optimize each IIR filter parameter so that the similarity between the target frequency response curve and the optimized simulated frequency response curve meets a preset condition, resulting in N optimized IIR filter parameters.

3. The method according to claim 2, characterized in that, The step of processing the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain includes: The parameters of the filter bank are obtained by cascading N optimized filter parameters. The audio data is input into the filter group to obtain the target audio in the time domain.

4. The method according to claim 1, characterized in that, The step of processing the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain includes: The audio data is then subjected to a Fast Fourier Transform to obtain frequency domain audio data. The optimized simulated frequency response curve in logarithmic form is then transformed into a linear frequency response curve. At each frequency component, the signal value of the frequency domain audio data is multiplied by the signal value of the linear frequency response curve to obtain the processed frequency domain audio data. The processed frequency domain audio data is converted by inverse fast Fourier transform to obtain the target audio in the time domain.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The target audio in the time domain is played through a high-fidelity device.

6. The method according to any one of claims 1 to 4, characterized in that, The simulation method is any of the following: finite element simulation method, electro-mechanical-acoustic analog equivalent circuit simulation method, and transfer matrix simulation method.

7. The method according to any one of claims 1 to 4, characterized in that, The structural parameters of the speaker module are any of the following structural parameters: Speaker driver and rear chamber; speaker driver and front chamber; speaker driver, rear chamber and front chamber; speaker driver, rear chamber, front chamber and slit; speaker driver, rear chamber, front chamber, slit and sound hole.

8. An acoustic simulation device, characterized in that, The device includes: The acquisition module is used to acquire simulation parameters, audio data and target frequency response curves. The simulation parameters include T / S parameters and structural parameters. The structural parameters include any one of the following: structural parameters of the speaker unit, structural parameters of the speaker module and structural parameters of the complete product. The simulation module is used to obtain simulation results based on the T / S parameters and the structural parameters using a preset simulation method, wherein the simulation results include a simulation frequency response curve; An optimization module is used to optimize the simulated frequency response curve by changing the parameters of a preset IIR filter according to the target frequency response curve through the optimization algorithm, thereby obtaining the optimized simulated frequency response curve and the optimized IIR filter parameters, wherein the similarity between the optimized simulated frequency response curve and the target frequency response curve satisfies a preset condition. The processing module is used to process the audio data according to the optimized IIR filter parameters or the optimized simulated frequency response curve to obtain the target audio in the time domain.

9. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.