A tcn-based in-vehicle audio equalizer compensation method and system

By adopting a TCN-based vehicle audio equalizer compensation method, which uses microphones to collect distorted time-domain waveforms and TCN to learn and generate linear phase FIR filter parameters, the shortcomings of traditional vehicle audio equalizers in terms of frequency response and phase are solved. This achieves adaptive and personalized sound quality optimization, improving the sound quality performance and user experience of the audio system.

CN121099239BActive Publication Date: 2026-03-17GUANGZHOU CHEERILEE ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing in-vehicle audio equalizers struggle to balance frequency response flatness, smoothness, and phase linearity across the entire frequency range, and cannot be jointly optimized with downstream tasks. Traditional design methods are computationally complex, rely on manual adjustments, and lack adaptive capabilities.

Method used

A vehicle audio equalizer compensation method based on Temporal Convolutional Network (TCN) is adopted. The distortion time-domain waveform is collected by microphone, and the parameters of linear phase FIR filter are automatically learned by TCN. Combined with dynamic environment perception and user feedback, personalized optimization is performed to construct the FIR filter coefficients with even symmetry characteristics for frequency response compensation.

Benefits of technology

It achieves intelligent adaptation of the in-vehicle audio system, improves sound quality and user listening experience, reduces computational complexity and system latency, meets real-time requirements, and provides a continuous and stable personalized listening experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121099239B_ABST
    Figure CN121099239B_ABST
Patent Text Reader

Abstract

This invention discloses a TCN-based equalizer compensation method and system for in-vehicle audio systems, relating to the field of in-vehicle electronic equipment technology. The method includes: playing a test signal in an in-vehicle environment; acquiring distorted time-domain waveforms affected by the in-vehicle acoustic environment via a microphone and preprocessing them; inputting the processed waveform into a temporal convolutional network to extract multi-scale temporal features; predicting the first half of the coefficients of a linear-phase FIR filter after global average pooling and fully connected layer mapping; symmetrically flipping and splicing these first half coefficients to construct the complete linear-phase FIR filter coefficients, and performing DC gain normalization; finally, performing a one-dimensional convolution operation between the normalized FIR filter coefficients and the original audio signal to output a frequency-response compensated equalized audio signal. This invention achieves adaptive equalization compensation for in-vehicle audio systems, significantly improving sound quality and listening experience while maintaining linear phase characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive electronic equipment technology, and more specifically, to a method and system for compensating automotive audio equalizers based on TCN. Background Technology

[0002] As a crucial electronic component within vehicles, in-car audio systems have gradually become standard equipment in mid-to-high-end and even some low-end models, driven by the deep integration of the electronics and information industry with the automotive industry. To improve the sound quality of these systems, equalizers—a core component of audio processing systems—are commonly used to correct and compensate for the frequency response curve of the audio source signal, resulting in a flatter, more uniform output signal and a more natural and realistic sound reproduction. Most existing in-car equalizers are based on finite impulse response (FIR) filters. FIR filters offer advantages such as structural stability, controllable phase response, and ease of achieving linear phase, making them widely used in audio processing.

[0003] However, traditional FIR filter design methods mainly rely on window function methods, the Parks-McClellan algorithm, or empirical parameter tuning. While window function methods are simple to implement, they have significant limitations in frequency band control and struggle to achieve complex frequency response shapes. The Parks-McClellan algorithm, while achieving a better trade-off between the passband and stopband, suffers from high computational complexity, sensitivity to initial conditions, and difficulty in embedding into adaptive systems. Empirical parameter tuning heavily relies on manual trial and error, lacking adaptability to the complex acoustic environment of in-vehicle environments and the personalized listening needs of users. All of these methods struggle to simultaneously achieve flatness, smoothness, and phase linearity across the entire frequency band, and cannot be jointly optimized with downstream tasks (such as noise suppression and speech enhancement). In recent years, with the development of deep learning technology, using neural networks to achieve end-to-end filter parameter prediction has become a research hotspot. However, how to achieve flatness and smoothness of the frequency response across a wide bandwidth while ensuring the physical realizability of the filter (such as linear phase and unity-gain constraints) remains a key challenge that has not yet been effectively solved in current technology. Therefore, developing a vehicle audio equalizer compensation method that can adapt to the in-vehicle acoustic environment, has high-precision frequency response compensation capability, and takes into account real-time processing efficiency has important theoretical value and broad application prospects. Summary of the Invention

[0004] To address the aforementioned technical issues, this invention proposes a TCN-based vehicle audio equalizer compensation method and system. This method can automatically learn and generate filter parameters that meet the requirements of linear phase, spectral flatness, and smooth response, while ensuring the physical realizability of the filter. This improves the overall sound quality of the vehicle audio system and the user's listening experience.

[0005] The first aspect of this invention provides a TCN-based vehicle audio equalizer compensation method, comprising the following steps:

[0006] S01: Play a known test audio signal in the car audio environment, and collect the distorted time-domain waveform affected by the in-vehicle acoustic environment through the microphone, and preprocess the time-domain waveform.

[0007] S02: Input the preprocessed time-domain waveform into a temporal convolutional network to extract multi-scale temporal features, perform global average pooling on the multi-scale temporal features, and then predict the first half coefficients of the linear phase FIR filter through a fully connected layer.

[0008] S03: The coefficients of the first half are symmetrically flipped and spliced ​​to construct the coefficients of a complete linear phase FIR filter with even symmetry characteristics, and DC gain is normalized.

[0009] S04: Perform a one-dimensional convolution operation between the normalized FIR filter coefficients and the original time-domain audio signal to be compensated, and output the equalized audio signal after frequency response compensation.

[0010] In this solution, a distorted time-domain waveform affected by the in-vehicle acoustic environment is acquired via a microphone, and the time-domain waveform is preprocessed, including:

[0011] The system plays a white noise test audio signal with a preset frequency that covers the range of human hearing through the speaker module of the car audio system, and collects the distortion time-domain waveform affected by the acoustic environment inside the car through the pre-deployed measurement microphones.

[0012] Nonlinear compression based on human hearing characteristics is introduced, and a filter simulating the equal loudness curve of the human ear is used to preprocess the waveform. The dynamic range of the mid-frequency human ear sensitive area is compressed, and other frequency ranges are compressed to obtain the normalized waveform.

[0013] A preprocessing attention network is constructed to perform sequence standardization on the normalized waveform. A preset length threshold is set. If the waveform length is greater than the length threshold, a sliding window with dilated convolution is used to calculate the information entropy of different segments of the normalized waveform, identify and retain key segments containing acoustic features. If the waveform length is not greater than the length threshold, frequency domain features are obtained and frequency domain feature components are analyzed to generate an extended signal similar to the waveform spectral envelope for splicing.

[0014] The cropped or filled waveform is output as a one-dimensional time-domain signal of uniform length, generating a preprocessed time-domain waveform.

[0015] In this scheme, the preprocessed time-domain waveform is input into a temporal convolutional network to extract multi-scale temporal features. These features are then subjected to global average pooling, and finally mapped through a fully connected layer to predict the first half of the coefficients of the linear-phase FIR filter, including:

[0016] The preprocessed time-domain waveform is input into a temporal convolutional network, which consists of several stacked temporal convolutional blocks. After the time-domain waveform is processed by the dilated convolution and nonlinear activation function of the temporal convolutional network, the one-dimensional time-domain waveform is transformed into a high-dimensional feature tensor.

[0017] The high-dimensional feature tensor is calculated by global average pooling to obtain the average value of all time feature values ​​in each channel, and the aggregated global feature vector is then input into the fully connected layer.

[0018] In the fully connected layer, the global feature vector is mapped to the target space, the dimension of which is set to M, where M = (N+1) / 2, N is the total length of the target FIR filter, and N is an odd number; the fully connected layer outputs a vector containing M values ​​to obtain the first half coefficients of the linear phase FIR filter.

[0019] In this scheme, the coefficients of the first half are symmetrically flipped and spliced ​​to construct a complete linear-phase FIR filter coefficient with even-symmetric characteristics, and DC gain normalization is performed, including:

[0020] The first half of the coefficients is imported into the linear phase FIR filter and denoted as a sequence of length M. After removing the last point of the sequence, the order is reversed. The first half of the coefficients is then concatenated with the reversed sequence to generate a filter coefficient sequence of length N, where N is the total length of the target FIR filter.

[0021] Calculate the algebraic sum of all coefficients in the filter coefficient sequence, and divide each filter coefficient by the algebraic sum to obtain the FIR filter coefficients after DC gain normalization.

[0022] In this scheme, the normalized FIR filter coefficients are convolved with the original time-domain audio signal to be compensated in one dimension, and the output is an equalized audio signal after frequency response compensation, including:

[0023] Obtain a series of filter coefficients of length N, with linear phase and DC gain of 1, and the original time-domain audio signal to be compensated. Use group convolution to multiply the corresponding points of the overlapping area of ​​the original time-domain audio signal to be compensated with the filter coefficients and accumulate them to obtain the equalized audio signal after frequency response compensation.

[0024] The equalized audio signal after frequency response compensation Represented as:

[0025] ;

[0026] in These are the filter coefficients. Sampling time, The first one in the original time-domain audio signal One sampling point, The total length of the target FIR filter.

[0027] In this solution, dynamic real-time adaptation is achieved through dynamic environment perception, including:

[0028] While acquiring the distorted time-domain waveform affected by the in-vehicle acoustic environment, sensor data from the vehicle's CAN bus is also acquired simultaneously. The sensor data includes: vehicle speed, engine speed, window opening / closing status, air conditioning fan speed, and external ambient noise.

[0029] Using the sensor data and acoustic features corresponding to the distorted time-domain waveforms as a training set, a deep neural network is used to learn the mapping relationship from sensor data to acoustic features, thereby training and generating an acoustic environment-sensor data association model.

[0030] Sensor data is encoded into environmental context feature vectors. Global feature vectors are fused with environmental context feature vectors. The fused vectors are then imported into a fully connected layer to obtain the first half of the coefficients of a linear phase FIR filter. The coefficients are then symmetrically flipped and spliced ​​to construct the complete linear phase FIR filter coefficients with even symmetry.

[0031] When the sensor data exceeds the preset threshold, the equalizer is updated and a smooth migration is initiated, gradually and linearly transitioning from the currently active FIR filter coefficients to the FIR filter coefficients predicted for the new environment.

[0032] The optimal FIR filter coefficients are calculated offline based on the driving scenarios corresponding to different sensor data. The driving scenarios and FIR filter coefficients are then used as pre-generated equalization parameter templates and stored in the template library.

[0033] During operation, the current sensor data is quickly matched with various driving scenarios in the template library, and the equalization parameter template is extracted based on the matching results to switch scenarios.

[0034] In this solution, a continuous optimization mechanism based on user feedback is used to personalize the equalizer's evolution, including:

[0035] When the user manually adjusts the equalizer, the equalizer setting parameters and the context information that triggered the adjustment are recorded, and a tuning log is generated. The tuning log includes audio content characteristics, vehicle environment status, user operation information and timestamp.

[0036] The temporal convolutional network is fine-tuned based on the stored tuning logs, the weights of the fully connected layers are updated, and the user-tuned temporal convolutional network is generated so that the network output is close to the equalizer effect set by the user manually.

[0037] Initialize the user preference feature vector. When the user manually adjusts the equalizer, the user's adjustment mode is encoded into a low-dimensional vector representing the user's preference. The user preference feature vector is updated using the low-dimensional vector. The dynamically updated user preference feature vector is then input into a temporal convolutional network to participate in the prediction of filter coefficients, and personalized sound quality is output.

[0038] The second aspect of the present invention provides a vehicle audio equalizer compensation system based on TCN, including: a signal acquisition and preprocessing module, a TCN feature extraction and coefficient prediction module, an FIR filter construction and gain normalization module, an audio equalization compensation module, a loss function design module, and an end-to-end training module.

[0039] The signal acquisition and preprocessing module acquires distorted time-domain waveforms affected by the in-vehicle acoustic environment through a microphone, and preprocesses the time-domain waveforms.

[0040] The TCN feature extraction and coefficient prediction module uses a temporal convolutional network to extract multi-scale temporal features of the temporal waveform, performs global average pooling on the multi-scale temporal features, and then maps them through a fully connected layer to predict the first half of the coefficients of the linear phase FIR filter.

[0041] The FIR filter construction and gain normalization module symmetrically flips and splices the predicted first half coefficients to construct a complete linear phase FIR filter coefficient with even symmetry characteristics, and performs DC gain normalization processing.

[0042] The audio equalization compensation module performs a one-dimensional convolution operation between the normalized FIR filter coefficients and the original time-domain audio signal to be compensated, and outputs the equalized audio signal after frequency response compensation.

[0043] The loss function design module combines audio power spectrum characteristics to design a composite loss function, which includes a spectral flatness constraint based on STFT and Welch method, a ripple penalty term, and a second-order difference regularization term for frequency response.

[0044] The end-to-end training module is based on the in-vehicle audio dataset and is trained using the stochastic gradient descent method. The model parameters and FIR coefficient predictions are optimized synchronously until the loss function converges. The resulting FIR filter can adaptively adjust according to the in-vehicle acoustic environment and audio features.

[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0046] This invention overcomes the limitations of traditional equalizer design by introducing a time-convolutional network (TCN) for end-to-end filter coefficient prediction, achieving intelligent and adaptive in-vehicle audio quality compensation. Specifically, traditional methods heavily rely on frequency response measurements and tedious manual adjustments or iterative calculations, which are not only time-consuming and computationally intensive but also struggle to guarantee spectral flatness across the entire frequency band. In contrast, this method directly uses the time-domain waveform as input and leverages the powerful long-sequence modeling capabilities of the TCN network to automatically learn and generate the optimal linear-phase FIR filter coefficients, eliminating complex manual intervention and iterative steps, and significantly improving the efficiency and accuracy of equalizer design.

[0047] This invention demonstrates exceptional stability in ensuring the physical realizability of the filter. Existing neural networks, especially when directly regressing filter parameters, often face challenges such as training instability or numerical overflow. This method, through a carefully designed composite loss function, combines frequency response flatness constraints, ripple suppression, and spectral smoothness regularization terms to guide network training. This ensures that the generated FIR filter not only accurately approximates the target gain within the band but also guarantees a smooth transition in the frequency response curve, effectively avoiding harshness and glitches in the listening experience. Furthermore, the feedback-free structure of the FIR filter fundamentally guarantees the robustness of the network training process, ultimately contributing to a significant improvement in sound quality.

[0048] In terms of computational efficiency, it utilizes symmetry to predict only half of the filter coefficients and combines efficient parallel computing techniques such as grouped convolution to significantly reduce computational complexity and system latency while maintaining high-fidelity processing quality. This fully meets the stringent real-time requirements of in-vehicle audio systems, bringing users a continuous, stable, natural, realistic, and highly personalized immersive listening experience. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments or examples of the present invention, the drawings used in the embodiments or examples will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained according to these drawings without creative effort.

[0050] Figure 1 A flowchart of a TCN-based in-vehicle audio equalizer compensation method is shown.

[0051] Figure 2 The overall flowchart of the in-vehicle audio equalizer compensation is shown;

[0052] Figure 3 A flowchart illustrating dynamic real-time adaptation through dynamic environment perception is shown.

[0053] Figure 4 A block diagram of a TCN-based in-vehicle audio equalizer compensation system is shown. Detailed Implementation

[0054] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0055] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0056] like Figure 1 and Figure 2 As shown, this embodiment provides a TCN-based in-vehicle audio equalizer compensation method, including:

[0057] S01: Play a known test audio signal in the car audio environment, and collect the distorted time-domain waveform affected by the in-vehicle acoustic environment through the microphone, and preprocess the time-domain waveform.

[0058] S02: Input the preprocessed time-domain waveform into a temporal convolutional network to extract multi-scale temporal features, perform global average pooling on the multi-scale temporal features, and then predict the first half coefficients of the linear phase FIR filter through a fully connected layer.

[0059] S03: The coefficients of the first half are symmetrically flipped and spliced ​​to construct the coefficients of a complete linear phase FIR filter with even symmetry characteristics, and DC gain is normalized.

[0060] S04: Perform a one-dimensional convolution operation between the normalized FIR filter coefficients and the original time-domain audio signal to be compensated, and output the equalized audio signal after frequency response compensation.

[0061] It should be noted that white noise test audio signals covering the audible range (typically 20Hz to 20kHz) are played through the car audio system's speaker modules. White noise can excite all frequency bands at once, effectively revealing the gain and attenuation of the in-car acoustic environment at different frequencies. The white noise signal propagates within the sealed car cabin, and is distorted by various factors, including: the frequency response characteristics of the speaker itself, the in-car acoustic environment, background noise, and microphone characteristics. The distorted time-domain waveforms influenced by the in-car acoustic environment are acquired through pre-deployed measurement microphones. The acquired signal is the time-domain convolution result of the original white noise and the impulse response of all in-car environmental factors, containing all acoustic defect information for equalization compensation.

[0062] A nonlinear compression based on human auditory characteristics is introduced. A filter simulating the equal loudness curve of the human ear is used to preprocess the waveform, compressing the dynamic range of the mid-frequency sensitive area and other frequency ranges to obtain a normalized waveform. The normalized waveform has a uniform amplitude distribution and is reweighted in terms of perceived importance, allowing the TCN network to focus on the distortion components that have the most significant impact on the auditory experience. A preprocessing attention network is constructed to perform sequence normalization on the normalized waveform. A preset length threshold is used. If the waveform length exceeds the threshold, a sliding window with dilated convolution is used to calculate the information entropy of different segments of the normalized waveform, identifying and retaining key segments containing acoustic features such as main formants and decaying tails, while eliminating redundant parts with low information content. If the waveform length is not greater than the threshold, frequency domain features are acquired and analyzed. An extended signal similar to the waveform's spectral envelope is generated and spliced ​​to meet the length threshold standard, maintaining the continuity of acoustic characteristics. The trimmed or padded waveform is output as a one-dimensional time-domain signal with uniform length, generating the preprocessed time-domain waveform.

[0063] It should be noted that the preprocessed temporal waveform is input into a temporal convolutional network, which consists of a pre-convolutional downsampling layer, multiple dilated convolutional residual blocks, a global average pooling layer, and fully connected layers. Each convolutional block has dilated causal convolution and residual connections. In the dilated convolution, higher-level convolutional layers can perceive multi-scale input ranges; shallower networks capture fine-grained short-term waveform features, while deeper networks capture coarse-grained long-term patterns. The output of each convolutional block is added to its input through residual connections. After processing by the dilated convolution and nonlinear activation function of the temporal convolutional network, the one-dimensional temporal waveform is transformed into a high-dimensional feature tensor. This high-dimensional feature tensor retains the sequence structure in the time dimension and contains rich temporal feature representations in the channel dimension.

[0064] The high-dimensional feature tensor is averaged using global average pooling to calculate the average of all time-varying feature values ​​across all channels, resulting in an aggregated global feature vector, which is then input into a fully connected layer. In this fully connected layer, the global feature vector is mapped to a target space with dimension M, where M = (N+1) / 2, and N is the total length of the target FIR filter, and N is an odd number. The fully connected layer outputs a vector containing M values, representing the first half of the coefficients of the linear-phase FIR filter. Based on the coefficient symmetry of the linear-phase FIR filter, predicting the first half of the coefficients reduces the number of model parameters, lowers computational complexity and the risk of overfitting, while ensuring that the final generated filter possesses accurate linear-phase characteristics.

[0065] Utilizing the mathematical symmetry of a linear-phase FIR filter, the complete filter is generated from the predicted first half of the coefficients. The first half of the coefficients is then imported into the linear-phase FIR filter and denoted as a sequence of length M. The sequence is reversed after removing the last point. The first half of the coefficients is then concatenated with the reversed sequence to generate a filter coefficient sequence of length N, where N is the total length of the target FIR filter. Assume the predicted first half of the coefficients is [h0, h1, h2], where h2 is the center point. The process of constructing the complete filter is as follows: take the first half of the coefficients [h0, h1, h2], then take the portion [h0, h1] excluding the center point and reverse it to obtain [h1, h0]. Finally, concatenate the two to obtain [h0, h1, h2, h1, h0]. Through symmetrical concatenation, an even-symmetric coefficient sequence is obtained. To prevent the filter from altering the overall energy level of the audio signal, the algebraic sum of all coefficients in the filter coefficient sequence is calculated. Each filter coefficient is divided by this algebraic sum to obtain the FIR filter coefficients after DC gain normalization. After the audio signal is processed by the filter, the perceived loudness will not be increased or decreased overall due to equalization compensation.

[0066] It should be noted that a series of filter coefficients of length N, with linear phase and DC gain of 1, and the original time-domain audio signal to be compensated are obtained. Group convolution is used to multiply the corresponding points of the overlapping region of the original time-domain audio signal to be compensated with the filter coefficients and then sum them to obtain the equalized audio signal after frequency response compensation. By using parallel processing or transforming to the frequency domain for calculation, the processing speed is significantly improved, meeting the real-time requirements of in-vehicle audio systems. The equalized audio signal after frequency response compensation... Represented as:

[0067] ;

[0068] in These are the filter coefficients. Sampling time, The first one in the original time-domain audio signal One sampling point, The total length of the target FIR filter.

[0069] The result of convolution is an equalized audio signal with frequency response compensation, preserving the original signal content but correcting the spectrum. Frequency bands that would have attenuated in the in-car acoustic environment are boosted, while frequency bands that would have resonated or been excessive are appropriately attenuated. While optimizing timbre, phase distortion is minimized, ensuring clarity, naturalness, and accurate sound imaging.

[0070] To ensure a flat and natural frequency response for the filter in the perceived frequency range, a short-time Fourier transform (STFT) is performed on the output signal, and its power spectrum is calculated. Time averaging is then employed using the Welch method to obtain a smooth frequency response estimate. Subsequently, mean anchoring and ripple constraints are applied within the 50Hz to 20kHz range to ensure the overall frequency response curve is close to 0dB and to suppress local fluctuations exceeding ±1dB. Furthermore, a second-order difference regularization term is introduced to further ensure a smooth transition of the frequency response across the entire frequency band. By combining the flatness loss and the smoothness regularization term into a total loss function, end-to-end training is performed using the Adam optimizer. During training, the model automatically adjusts its parameters, learning an FIR filter that matches the in-vehicle acoustic environment and audio characteristics, thereby achieving an adaptive effect for sound quality optimization.

[0071] It should be noted that dynamic real-time adaptation is achieved through dynamic environment perception. For example... Figure 3 As shown, while acquiring distorted time-domain waveforms affected by the in-vehicle acoustic environment, sensor data from the vehicle's CAN bus is simultaneously acquired. This sensor data includes vehicle speed, engine speed, window opening / closing status, air conditioning fan speed, and external ambient noise. Each different combination of vehicle states is considered an independent acoustic scene. The acoustic features corresponding to the sensor data and distorted time-domain waveforms are used as a training set. A deep neural network is then used to learn the mapping relationship from sensor data to acoustic features, training to generate an acoustic environment-sensor data association model.

[0072] An environment perception branch composed of fully connected layers is set up to encode sensor data into environmental context feature vectors. The global feature vector is fused with the environmental context feature vectors. The fused vector contains information about the audio content itself and the current state information of the vehicle's acoustic environment. The fusion vector is imported into the fully connected layer to obtain the first half of the coefficients of the linear-phase FIR filter. These coefficients are then symmetrically flipped and concatenated to construct the complete linear-phase FIR filter coefficients with even symmetry. When the detected sensor data exceeds a preset threshold, an equalizer update is triggered (e.g., the vehicle speed crosses a certain threshold). This is determined as a scene switching event, and a smooth transition is initiated, gradually and linearly transitioning from the currently effective FIR filter coefficients to the FIR filter coefficients predicted for the new environment. The interpolation process is performed directly in the filter coefficient space to ensure the continuity of frequency response changes and guarantee the coherence and comfort of the auditory experience. The optimal FIR filter coefficients are calculated offline based on the driving scenarios corresponding to different sensor data. The driving scenarios and FIR filter coefficients are used as pre-generated equalization parameter templates and stored in the template library, such as urban congestion with windows closed and highway cruising with windows closed. During operation, the current sensor data is quickly matched with each driving scenario in the template library, and the equalization parameter templates are extracted based on the matching results for scene switching.

[0073] It should be noted that a continuous optimization mechanism based on user feedback is used to personalize the equalizer. When a user manually adjusts the equalizer (e.g., boosting bass, attenuating treble, or selecting a preset sound effect), the equalizer settings and the context information triggering the adjustment are recorded, generating a tuning log. This tuning log includes audio content features, vehicle environment status, user operation information, and a timestamp. Based on the stored tuning log, the temporal convolutional network is fine-tuned, updating the weights of the fully connected layers while keeping the feature extraction layer unchanged, significantly reducing computation and preventing the forgetting of general acoustic compensation knowledge. A user-tuned temporal convolutional network is generated, making the network output close to the equalizer effect after the user manually sets it. The user preference feature vector is initialized. When the user manually adjusts the equalizer, the user's adjustment mode is encoded into a low-dimensional vector representing the user's preference. This low-dimensional vector is used to update the user preference feature vector. The dynamically updated user preference feature vector is then used as one of the inputs to the temporal convolutional network to participate in the prediction of filter coefficients, outputting personalized sound quality.

[0074] like Figure 4 As shown, the second embodiment of the present invention provides a vehicle audio equalizer compensation system based on TCN. The system includes: a signal acquisition and preprocessing module, a TCN feature extraction and coefficient prediction module, an FIR filter construction and gain normalization module, an audio equalization compensation module, a loss function design module, and an end-to-end training module.

[0075] The signal acquisition and preprocessing module acquires distorted time-domain waveforms affected by the in-vehicle acoustic environment through a microphone, and preprocesses the time-domain waveforms.

[0076] The TCN feature extraction and coefficient prediction module uses a temporal convolutional network to extract multi-scale temporal features of the temporal waveform, performs global average pooling on the multi-scale temporal features, and then maps them through a fully connected layer to predict the first half of the coefficients of the linear phase FIR filter.

[0077] The FIR filter construction and gain normalization module symmetrically flips and splices the predicted first half coefficients to construct a complete linear phase FIR filter coefficient with even symmetry characteristics, and performs DC gain normalization processing.

[0078] The audio equalization compensation module performs a one-dimensional convolution operation between the normalized FIR filter coefficients and the original time-domain audio signal to be compensated, and outputs the equalized audio signal after frequency response compensation.

[0079] The loss function design module combines audio power spectrum characteristics to design a composite loss function, which includes a spectral flatness constraint based on STFT and Welch method, a ripple penalty term, and a second-order difference regularization term for frequency response.

[0080] The end-to-end training module is based on the in-vehicle audio dataset and is trained using the stochastic gradient descent method. The model parameters and FIR coefficient predictions are optimized synchronously until the loss function converges. The resulting FIR filter can adaptively adjust according to the in-vehicle acoustic environment and audio features.

[0081] The third embodiment of the present invention provides a computer-readable storage medium, which includes a TCN-based vehicle audio equalizer compensation method program. When the TCN-based vehicle audio equalizer compensation method program is executed by a processor, it implements the steps of the TCN-based vehicle audio equalizer compensation method.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, and can be electrical, mechanical, or other forms. Furthermore, in the various embodiments of the present invention, all functional units can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0083] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0084] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A TCN-based in-vehicle sound system equalizer compensation method, characterized in that, The method comprises the following steps: S01: playing a known test audio signal in a car audio environment, and collecting a distorted time domain waveform affected by the in-vehicle acoustic environment through a microphone, and preprocessing the time domain waveform; S02: inputting the preprocessed time domain waveform into a time convolution network, extracting multi-scale time sequence features, performing global average pooling on the multi-scale time sequence features, and then mapping through a fully connected layer to predict the first half of the coefficients of the linear phase FIR filter; S03: performing symmetric flipping and splicing on the first half of the coefficients to construct a complete linear phase FIR filter coefficient with even symmetry characteristics, and performing direct current gain normalization processing; S04: performing one-dimensional convolution operation on the normalized FIR filter coefficients and the original time domain audio signal to be compensated to output an equalized audio signal after frequency response compensation.

2. The TCN-based car audio equalizer compensation method of claim 1, wherein, The preprocessing of the time domain waveform collected by the microphone affected by the in-vehicle acoustic environment comprises: playing a white noise test audio signal covering the audible range of human ears through the speaker module of the car audio, and collecting the distorted time domain waveform affected by the in-vehicle acoustic environment through the pre-designed measurement microphone; introducing a nonlinear compression based on the human ear hearing characteristics, using a filter simulating the equal loudness curve of the human ear to preprocess the waveform, maintaining the dynamic range of the medium frequency sensitive area of the human ear, and compressing other frequency ranges to obtain the normalized waveform; constructing a preprocessing attention network to sequence standardize the normalized waveform, presetting a length threshold, if the waveform length is greater than the length threshold, using a sliding window with dilated convolution to calculate the information entropy of different segments of the normalized waveform, identifying and retaining the key segments containing acoustic characteristics; if the waveform length is not greater than the length threshold, obtain the frequency domain features, analyze the frequency domain feature components, generate an expanded signal similar to the waveform spectrum envelope for splicing; outputting the cropped or padded waveform as a one-dimensional time domain signal with uniform length to generate the preprocessed time domain waveform.

3. The TCN-based car audio equalizer compensation method of claim 1, wherein, The preprocessing of the time domain waveform collected by the microphone affected by the in-vehicle acoustic environment comprises: inputting the preprocessed time domain waveform into a time convolution network, the time convolution network is composed of a plurality of stacked time sequence convolution blocks, the one-dimensional time domain signal is converted into a high-dimensional feature tensor after the dilated convolution and nonlinear activation function processing of the time convolution network; performing global average pooling on the high-dimensional feature tensor to calculate the average of all time feature values in each channel to obtain an aggregated global feature vector, and inputting the global feature vector into a fully connected layer; mapping the global feature vector to a target space in the fully connected layer, the dimension of the target space is set to M, where M = (N+1) / 2, N is the total length of the target FIR filter, and N is an odd number; the fully connected layer outputs a vector containing M numerical values to obtain the first half of the coefficients of the linear phase FIR filter.

4. The TCN-based car audio equalizer compensation method of claim 1, wherein, symmetrically flipping and splicing the first half of the coefficients to construct complete linear phase FIR filter coefficients with even symmetry characteristics, and performing DC gain normalization processing, comprising: introducing the first half of the coefficients into a linear phase FIR filter, and denoting it as a sequence with a length of M, sequentially flipping the sequence after removing the last point, connecting the first half of the coefficients with the flipped sequence to generate a filter coefficient sequence with a length of N, N being the total length of the target FIR filter; calculating the algebraic sum of all coefficients in the filter coefficient sequence, and dividing each filter coefficient by the algebraic sum to obtain the DC gain normalized FIR filter coefficients.

5. The TCN-based car audio equalizer compensation method of claim 1, wherein, performing one-dimensional convolution operation on the normalized FIR filter coefficients and the original time domain audio signal to be compensated to output an equalized audio signal after frequency response compensation, comprising: obtaining a filter coefficient series with a length of N, a linear phase, and a DC gain of 1, and an original time domain audio signal to be compensated, and multiplying and accumulating corresponding points in the overlapping region of the filter coefficients and the original time domain audio signal to be compensated by using grouped convolution to obtain an equalized audio signal after frequency response compensation; The frequency response compensated equalized audio signal is represented as: , wherein is a filter coefficient, is a sampling instant, is the i-th sample point in the original time-domain audio signal, is the i-th sample point in the original time-domain audio signal, is the total length of the target FIR filter.

6. The TCN-based car audio equalizer compensation method of claim 3, wherein, dynamic real-time self-adaptation through dynamic environment perception, comprising: synchronously collecting sensor data from the vehicle CAN bus while collecting distorted time domain waveforms affected by the in-vehicle acoustic environment, the sensor data including: vehicle speed, engine speed, window opening and closing state, air conditioning air volume gear and external environmental noise; using the sensor data and the acoustic characteristics corresponding to the distorted time domain waveform as a training set, learning the mapping relationship from the sensor data to the acoustic characteristics through a deep neural network to train an acoustic environment-sensor data correlation model; encoding the sensor data into an environmental context feature vector, fusing the global feature vector with the environmental context feature vector, and introducing the fused vector into a fully connected layer to obtain the first half of the coefficients of the linear phase FIR filter, symmetrically flipping and splicing to construct complete linear phase FIR filter coefficients with even symmetry characteristics; when the detected sensor data is greater than a preset threshold, triggering equalizer update and starting smooth transition from the currently effective FIR filter coefficients to the FIR filter coefficients predicted for the new environment; calculating the optimal FIR filter coefficients according to the driving scenarios corresponding to different sensor data offline, using the driving scenarios and FIR filter coefficients as pre-generated equalization parameter templates, and storing them in a template library; in the running process, quickly matching the current sensor data with each driving scenario in the template library, and extracting the equalization parameter template according to the matching result for scene switching.

7. The TCN-based car audio equalizer compensation method of claim 3, wherein, a continuous optimization mechanism based on user feedback for personalized evolution of the equalizer, comprising: when the user manually adjusts the equalizer, recording the equalizer setting parameters and the context information triggering the adjustment to generate a tuning log, the tuning log including audio content characteristics, vehicle environment state, user operation information, and timestamp; The time convolution network is fine-tuned according to the stored tuning log, the weights of the full connection layer are updated, a user fine-tuned time convolution network is generated, and the network output is close to the equalizer effect after the user manually sets; The user preference feature vector is initialized, when the user manually adjusts the equalizer, the adjustment mode of the user is coded into a low-dimensional vector representing the user preference, the low-dimensional vector is used to update the user preference feature vector, and the dynamically updated user preference feature vector is input into the time convolution network as one of the inputs to participate in the prediction of the filter coefficient and output personalized sound quality.

8. A TCN-based in-vehicle sound system equalizer compensation system, characterized by, The TCN-based vehicle-mounted audio equalizer compensation method according to any one of claims 1-7 comprises a signal acquisition and preprocessing module, a TCN feature extraction and coefficient prediction module, an FIR filter construction and gain normalization module, an audio equalization compensation module, a loss function design module, and an end-to-end training module. The signal acquisition and preprocessing module acquires a distorted time-domain waveform affected by the in-vehicle acoustic environment through a microphone, and pre-processes the time-domain waveform. The TCN feature extraction and coefficient prediction module extracts multi-scale time sequence features of the time-domain waveform using a time convolution network, globally averages the multi-scale time sequence features, and then maps them through a full connection layer to predict the first half of the coefficients of the linear-phase FIR filter. The FIR filter construction and gain normalization module flips and splices the predicted first half of the coefficients to construct a complete linear-phase FIR filter coefficient with even symmetry characteristics, and performs direct current gain normalization processing. The audio equalization compensation module performs one-dimensional convolution operation on the normalized FIR filter coefficients and the original time-domain audio signal to be compensated to output the equalized audio signal after frequency response compensation. The loss function design module designs a composite loss function combining the audio power spectrum characteristics, and the composite loss function includes spectral flatness constraints based on STFT and Welch method, ripple penalty term, and frequency response second-order difference regularization term. The end-to-end training module trains based on the vehicle-mounted audio data set using the stochastic gradient descent method, synchronously optimizes the model parameters and FIR coefficient prediction, until the loss function converges, and finally obtains an FIR filter that can adaptively adjust according to the in-vehicle acoustic environment and audio characteristics.

Citation Information

Patent Citations

  • Vehicle-mounted audio equalizer compensation method and system based on deep neural network

    CN116074697A

  • Intelligent audio test system frequency response analysis method, device and equipment

    CN119446188A