RNN (Recurrent Neural Network)-based offline estimation method for nonlinear transfer function of active noise reduction of automobile
By using a lightweight LSTM/GRU model for nonlinear transfer function estimation in automotive active noise cancellation systems, the problem of acoustic path nonlinearity that traditional algorithms cannot handle is solved, resulting in better noise suppression and system stability, and adapting to the acoustic characteristics of different vehicle models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-03
AI Technical Summary
Existing active noise reduction algorithms for automobiles cannot effectively handle the nonlinear characteristics of acoustic paths, resulting in poor noise suppression performance. Furthermore, online estimation methods are affected by in-vehicle audio effects and environmental noise, failing to meet real-time computing requirements.
A lightweight LSTM/GRU recurrent neural network model is used for nonlinear transfer function estimation. Combined with the traditional least mean square algorithm, it is trained offline and deployed on an in-vehicle audio processor to replace the linear transfer function model in the traditional algorithm. Matrix operations are performed using the audio processor's SIMD instructions or hardware accelerators to meet real-time requirements.
It improves the noise suppression effect inside the vehicle, enhances the acoustic experience, reduces the computing load on the vehicle audio processor, ensures the stability and consistency of the noise reduction system, and adapts to the acoustic space characteristics of different vehicle models.
Smart Images

Figure CN121600902A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automotive engineering and intelligent signal processing technology, and particularly relates to an offline estimation method for nonlinear transfer function of active noise reduction in automobiles based on RNN. Background Technology
[0002] In the field of active noise cancellation technology for automobiles, traditional noise reduction algorithms include Least Mean Square (LMS), Affine Projection (APA), and Least Squares (LS). The effectiveness of these algorithms largely depends on the estimation of secondary acoustic path transfer functions and the acoustic path transfer functions of remote microphones. The mainstream estimation method assumes that the acoustic path is a linear system (usually an MA model, but an ARMA model can also be used), which is an approximation of the actual nonlinear system. This estimation is offline, meaning that microphones need to be pre-positioned in the target noise reduction area of the car (usually near the headrests, A-pillars, and C-pillars, etc., close to the ears). White noise is played sequentially by various speakers in the car body (usually placed in the doors, trunk, and roof, etc.), and the microphones collect the corresponding audio signals. The Least Mean Square algorithm or similar algorithms are then used on a computer for estimation. The entire data acquisition process needs to be carried out in a semi-anechoic chamber. Although online estimation methods have emerged in recent years—that is, estimation methods run on the in-vehicle audio processor during vehicle operation, dynamically adjusting the acoustic path estimation function based on actual vehicle conditions (such as interior modifications, changes in occupants, etc.)—these online methods have proven ineffective in practice. This is because they require no impact on the vehicle's inherent audio quality and are subject to real-time interference from ambient noise. Therefore, offline methods remain the mainstream approach. These traditional methods have the advantages of a mature theoretical foundation, numerous application cases, low computational cost, and fast solution speed; however, they are incapable of handling the nonlinear components of the system. Therefore, a nonlinear modeling method is needed to better reduce noise and improve the acoustic experience for passengers and drivers.
[0003] Acoustic data is time-series data, and RNNs (Recurrent Neural Networks) are one type of neural network specifically designed to process this type of data. They have numerous applications in speech recognition, speech synthesis, translation, text generation, weather forecasting, and load prediction. However, RNN models are computationally expensive (traditional estimation methods yield results in minutes, but RNN training often takes more than two weeks). For automotive active noise cancellation, real-time computation is required, necessitating lightweight RNN models and a sufficiently high-speed automotive audio processor, multiple DSP cores, or even a dedicated audio processor for noise cancellation algorithms. Various RNN models exist, the most famous being LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit). GRU has a simpler structure, requires less memory, and is suitable for real-time embedded systems in automobiles.
[0004] The transfer function estimated using the RNN model needs to be embedded into a traditional least mean square algorithm (such as the FxLMS algorithm) to replace the secondary acoustic path transfer function and the remote microphone transfer function, thereby achieving the purpose of noise reduction.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] An offline estimation method for the nonlinear transfer function of active noise reduction in automobiles based on RNN includes the following steps:
[0007] Step 1: Place physical microphones in the target noise reduction area inside the vehicle and place secondary speakers at preset positions on the vehicle body;
[0008] Step 2: Control the secondary speaker to play white noise signal, and simultaneously collect noise signal through error microphone to build a synchronous audio acquisition and playback system. Perform downsampling operation on the acquired data to adapt to the target noise reduction frequency band.
[0009] Step 3: Normalize the downsampled audio data to make the data range fit the processing requirements of the neural network activation function;
[0010] Step 4: Divide the preprocessed dataset into training, validation, and test sets in a 4:2:2 ratio;
[0011] Step 5: Set up a single-input, single-output RNN model structure, using a single hidden layer, and determine the core parameters such as the hidden layer size and learning rate through experiments and debugging;
[0012] Step 6: Construct LSTM and GRU models based on the machine learning framework, and iteratively train them on the training set using the mean squared error loss function and the Adam optimizer. Select the model parameters with the minimum loss value on the validation set.
[0013] Step 7: Test the LSTM or GRU model with optimal parameters on the test set, and evaluate the transfer function estimation performance by plotting the spectrum.
[0014] Step 8: Implement the various computation modules of the LSTM and GRU models using C language, and complete the basic operations of the corresponding gating and memory units;
[0015] Step 9: Using the audio processor's accompanying instructions, perform matrix operations on the gating and memory units corresponding to the two types of model memory sequences;
[0016] Step 10: Implement the activation functions for the corresponding gating and memory units of the model, and complete the calculation of the gating value;
[0017] Step 11: Obtain the hidden layer output of the LSTM or GRU model according to the preset logic;
[0018] Step 12: Update the memory sequences or memory units of the two types of models according to the specific formula;
[0019] Step 13: Combine the output layer weights and bias parameters to complete the final calculation of the model's output layer;
[0020] Step Fourteen: Perform denormalization on the model output data to restore the characteristics of the real acoustic data;
[0021] Step 15: Use dedicated instructions or hardware accelerators from the audio processor to perform model matrix operations, and deploy the model to the in-vehicle audio DSP to ensure the real-time performance of the noise reduction system;
[0022] Finally, the trained and deployed RNN model is embedded into the traditional active noise reduction algorithm, replacing the linear transfer function model in the original algorithm.
[0023] Preferably, the physical microphone in step one is located near the seat headrest, the A-pillar or C-pillar of the car, and the secondary speaker is located in the door, trunk or roof, and the data acquisition process in step two is completed in a semi-anechoic chamber.
[0024] Preferably, in step two, the original sampling rate of the audio acquisition is 48kHz, the target frequency band for active noise reduction is a frequency band below 500Hz, the downsampling factor is 24 times, and the actual working sampling rate of the noise reduction system after model deployment is 2kHz; the audio acquisition and playback system includes ADI's ADSP21565 audio processing platform, TI's TAS6424 power amplifier, TI's PCM6240 ADC, and an automotive-grade electret analog microphone.
[0025] Preferably, the normalization process in step three maps the data to the [-1,1] interval, and the appropriate activation functions are the sigmoid function and the tanh function. The denormalization process is the inverse operation of normalization.
[0026] Preferably, the machine learning framework mentioned in step six is PyTorch. The LSTM model is divided into an LSTM layer and an output layer. The LSTM layer contains the weights and bias parameters of the input gate, forget gate, output gate, and memory unit corresponding to the input sequence and memory sequence. The GRU model is divided into a GRU layer and an output layer. The GRU layer contains the weights and bias parameters of the reset gate, update gate, and new gate corresponding to the input sequence and memory sequence. The output layer parameters of the two types of models are the same.
[0027] Preferably, in step eight, the LSTM model input sequence correspondence operation is implemented using ADI's vecsmltf and vecsaddf instructions; in step nine, the memory sequence correspondence operation is implemented using ADI's matmmltf and vecvaddf instructions; and in step eleven, the LSTM layer point-to-point product operation is implemented using ADI's vecvmltf instruction.
[0028] Preferably, in step ten, the input gate, forget gate, and output gate of the LSTM model use the sigmoid activation function, and the memory unit uses the tanh activation function; the reset gate and update gate of the GRU model use the sigmoid activation function, and the new gate uses the tanh activation function.
[0029] Preferably, the special instructions mentioned in step fifteen are SIMD instructions, and matrix operations are not implemented using a pure CPU approach to avoid failing to meet the real-time requirements of the ANC system.
[0030] Preferably, in the single-channel passenger vehicle engine noise reduction system, only the acoustic path transfer function of the remote microphone is replaced with the RNN model, while the secondary path and virtual microphone path transfer functions are modeled using the traditional MA model. At the same time, the real-time engine speed signal is obtained through the CAN bus to construct an order noise reference vector, and the noise reduction filter coefficients are iteratively updated in combination with the notch filter FxLMS algorithm.
[0031] Preferably, the GRU model is more suitable for in-vehicle real-time embedded systems than the LSTM model because of its simpler structure and smaller memory footprint; and the new gate calculation formula of the GRU model is adapted to the parameter characteristics of the PyTorch framework, which differs from the classic GRU calculation formula.
[0032] The technical effects and advantages of the offline estimation method for nonlinear transfer function of active noise reduction in automobiles based on RNN in this invention are as follows:
[0033] 1. Traditional automotive active noise cancellation algorithms (LMS, APA, LS, etc.) assume the acoustic path as a linear system (MA / ARMA model), which cannot adapt to the nonlinear characteristics of the actual acoustic path. This invention uses two RNN models, LSTM and GRU, to estimate the nonlinear transfer function, which can accurately characterize the nonlinear characteristics of the acoustic path, effectively improve the noise suppression effect in the vehicle, and improve the acoustic experience of the driver and passengers.
[0034] 2. This invention addresses the issue of high computational load in RNN models by selecting the simpler and less memory-intensive GRU model to adapt to in-vehicle real-time embedded systems. Furthermore, during the deployment phase, the SIMD instructions of the audio processor or hardware accelerators are used to perform matrix operations, abandoning the pure CPU operation mode and meeting the high real-time requirements of the ANC system. At the same time, the working sampling rate of the noise reduction system is reduced to 2kHz through 24x downsampling, significantly reducing the computational load on the in-vehicle audio processor.
[0035] 3. The data acquisition phase of this invention is completed in a semi-anechoic chamber, which can avoid interference from external environmental noise. Furthermore, through operations such as 48kHz synchronous sampling, [-1,1] interval normalization processing, and 4:2:2 ratio of dataset partitioning, it adapts to the processing requirements of sigmoid / tanh activation functions, thereby improving the stability of model training. During the training phase, the MSELoss loss function and Adam optimizer are used to select the optimal model parameters. Combined with the subjective evaluation method of spectrogram, the accuracy of transfer function estimation is guaranteed.
[0036] 4. This invention embeds a trained RNN model into traditional least mean square algorithms such as FxLMS, replacing only the acoustic path transfer function of the remote microphone. The secondary path and virtual microphone path still use the mature MA linear model. This not only retains the engineering application basis of the traditional algorithm, but also optimizes the estimation effect of the critical path through nonlinear modeling. At the same time, it balances the noise reduction performance with the computing power limit of the vehicle processor, and has strong engineering feasibility.
[0037] 5. The invention method is an offline estimation process, which can complete customized data collection, model training and DSP deployment for specific vehicle models. It can adapt to the acoustic spatial characteristics of different vehicle models, and the model can be stably applied after training without dynamic adjustment during vehicle operation. It avoids the drawbacks of online estimation being affected by in-vehicle audio effects and environmental noise, and ensures the stability and consistency of noise reduction effect. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the acoustic path input in the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention;
[0039] Figure 2 This is a schematic diagram of the excitation signal of the acoustic path in the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention.
[0040] Figure 3 This is a schematic diagram illustrating the steps of deploying the LSTM model in the offline estimation method for the nonlinear transfer function of active noise reduction in automobiles based on RNN proposed in this invention.
[0041] Figure 4 This is a block diagram of the LSTM model in the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention;
[0042] Figure 5 This is a schematic diagram illustrating the deployment steps of the GRU model in the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention.
[0043] Figure 6 This is a block diagram of the GRU model for the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention.
[0044] Figure 7 This is a diagram showing the estimation effect of the LSTM model in the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention.
[0045] Figure 8 This is a graph showing the estimation effect of the GRU model in the offline estimation method of nonlinear transfer function for active noise reduction of automobiles based on RNN proposed in this invention. Detailed Implementation
[0046] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0047] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0048] refer to Figure 1-8 This invention
[0049] Step 1: In the data acquisition phase, as with traditional methods, physical microphones and secondary speakers are placed inside the vehicle.
[0050] Step Two: The secondary speaker plays a white noise signal while an error microphone simultaneously collects the noise signal. As shown in the diagram, the audio processing platform uses ADI's ADSP21565, the power amplifier uses TI's TAS6424 solution, the ADC uses TI's PCM6240 solution, and the microphone is an automotive-grade electret analog microphone. Audio playback and acquisition must be synchronized, with a sampling rate of 48kHz. The target noise reduction frequency band for active noise control is often less than 500Hz. Therefore, the noise reduction algorithm does not need to process data with a sampling rate of 48kHz; it can downsample (e.g., by a factor of 24), greatly reducing the computational demands on the audio processor.
[0051] Step 3: Since the activation functions sigmoid and tanh in neural networks are suitable for processing data between [-1, 1], it is necessary to normalize the audio playback and acquisition data.
[0052] Step 4: Divide the dataset into three parts: training set, validation set, and test set in a 4:2:2 ratio.
[0053] Step 5: Setting model parameters. This system is a single-input, single-output system, so the model has only one input and one output parameter. For the hidden layer, a single layer is sufficient in the ANC field. The size N of the hidden layer, the learning rate, etc., need to be determined by debugging based on experimental results.
[0054] Step Six: Training the LSTM model. This invention directly uses the PyTorch `torch.nn.lstmJ` library for training, employing `torch.nn.MSELoss` as the loss function and `torch.optim.Adam` as the optimizer. Multiple iterative inference iterations are performed on the training set, with each iteration outputting corresponding parameters. These parameters are then used to test the validation set, selecting the parameters that minimize the loss function output. The entire model can be divided into an LSTM layer and an output layer. The LSTM layer parameters are as follows:
[0055] The input gate weights of the input sequence are: vector
[0056] The input gate bias of the input sequence is vector
[0057] The forget gate weights of the input sequence are: vector
[0058] The forget gate bias of the input sequence is vector
[0059] The output gate weights of the input sequence are... vector
[0060] The output gate bias of the input sequence is... vector
[0061] The weights of the memory units in the input sequence are: vector
[0062] The memory unit bias of the input sequence is vector
[0063] The input gate weights of the memory sequence are: matrix
[0064] The input gate bias of the memory sequence is vector
[0065] The forget gate weights of the memory sequence are: matrix
[0066] The forgetting gate bias of a memory sequence is vector
[0067] The output gate weights of the memory sequence are matrix
[0068] The output gate bias of the memory sequence is... vector
[0069] The weights of memory units in a memory sequence are: matrix
[0070] The memory unit bias of a memory sequence is vector
[0071] The output layer parameters are as follows:
[0072] Output layer weights are vector
[0073] Output layer bias is a scalar.
[0074] Step 7: Test on the test set and subjectively evaluate the test results (generally speaking, plotting the output spectrum can clearly show the noise reduction effect).
[0075] Step 8: The ANC system has very high real-time requirements, so the model deployment first uses C language to implement the various modules of the model.
[0076] The input sequence corresponds to the formulas for the input gate, forget gate, output gate, and memory unit, respectively:
[0077]
[0078]
[0079]
[0080]
[0081] in This is a normalized speaker signal. Such formulas can be implemented using vecsmltf and vecsaddf provided by ADI.
[0082] Step Nine: The formulas for implementing the memory sequence, corresponding to the input gate, forget gate, output gate, and memory unit, are:
[0083]
[0084]
[0085]
[0086]
[0087] in This is the memory of the LSTM output sequence. Such formulas can be implemented using matmmltf and vecvaddf provided by Analog Devices (ADI).
[0088] Step 10: Implementation of input gate function, forget gate function, output gate function, and memory unit function.
[0089]
[0090]
[0091]
[0092]
[0093] The definition of the activation function sigmoid is: The definition of tanh is: .
[0094] Step 11: The formula for the LSTM layer output is as follows:
[0095]
[0096]
[0097] in It is a memory unit, used Vector representation. Symbols The symbol represents a point-to-point product (which can be implemented using vecvmltf provided by ADI), therefore... and yes vector.
[0098] Step 12: Update memory sequences and memory units
[0099]
[0100]
[0101] Step 13: The output layer output implementation formula is as follows:
[0102]
[0103] Step Fourteen: Before inputting the model, we normalize the data. Therefore, the output data of the model needs to be denormalized.
[0104] Step 15: Deployment of the LSTM model. The matrix operations in the above formulas can be implemented using SIMD instructions or hardware accelerators provided by the processor manufacturer. However, the CPU implementation method is difficult to meet the real-time requirements of the ANC system.
[0105] Step Sixteen: Training the GRU model follows the same process as the LSTM model. This invention also directly uses the PyTorch `torch.nn.lstmJ` library for training, employing `torch.nn.MSELoss` as the loss function and `torch.optim.Adam` as the optimizer. Multiple iterative inference iterations are performed on the training set, with each iteration outputting corresponding parameters. These parameters are then used to test the validation set, selecting the parameters that minimize the loss function output. The entire model can be divided into a GRU layer and an output layer. The GRU layer parameters are as follows:
[0106] The reset gate weights of the input sequence are: vector
[0107] The reset gate bias of the input sequence is vector
[0108] The update gate weights of the input sequence are: vector
[0109] The update gate bias of the input sequence is vector
[0110] The new gate weights of the input sequence are: vector
[0111] The new gate bias of the input sequence is vector
[0112] The reset gate weights of the memory sequence are: matrix
[0113] The reset gate bias of the memory sequence is vector
[0114] The update gate weights of the memory sequence are: matrix
[0115] The update gate bias of the memory sequence is vector
[0116] The new gate weights of the memory sequence are matrix
[0117] The new gate bias of the memory sequence is vector
[0118] The output layer parameter notation is the same as that of the LSTM model.
[0119] Step 17: Similar to the LSTM model, test on the test set and subjectively evaluate the test results.
[0120] Step 18: Implement the various modules of the model using C language. The input sequence corresponds to the reset gate and update gate implementation formulas, respectively:
[0121]
[0122]
[0123] in It is a normalized loudspeaker signal.
[0124] Step 19: The memory sequence corresponds to the following formulas for the reset gate and update gate:
[0125]
[0126]
[0127] Step 20: Calculate the reset gate and update gate:
[0128]
[0129]
[0130] Step 21: Calculate the new gate (note that the calculation formula using the parameters provided by PyTorch differs from the classic RGU):
[0131]
[0132] Step 22: The formula for the LSTM layer output is as follows:
[0133]
[0134] Step 23: Update the memory sequence
[0135]
[0136] Step 24: The output layer output implementation formula is as follows:
[0137]
[0138] Step Fourteen: Before inputting the model, we normalize the data. Therefore, the output data of the model needs to be denormalized.
[0139] Step 15: Deployment of the GRU model. The matrix operations in the above formulas can be implemented using SIMD instructions or hardware accelerators provided by the processor manufacturer. However, the CPU implementation method is difficult to meet the real-time requirements of the ANC system.
[0140] The following is a specific implementation of embedding an RNN model into a single-channel passenger car engine noise reduction system with remote microphone functionality.
[0141] In this system, for noise control of the driver's seat, the acoustic path transfer function of the remote microphone is... Modeling is done using RNNs, and the secondary path transfer function... and virtual microphone path transfer function Both are modeled using the traditional MA model. The physical microphone (front microphone) is placed at the headrest, and the virtual microphone (error microphone) is placed at the ear. Noise reduction is achieved using the left front door speaker.
[0142] Audio signal sampling rate of the audio processor The sampling rate of the noise reduction system is set to 48kHz. Set it to 2kHz.
[0143] Based on the above LSTM (or GRU) operation steps, estimate During the data acquisition phase, the audio sampling rate is Before offline RNN training, the microphone data was downsampled by a factor of 24. Finally, the RNN model was implemented using C language and the SIMD instructions provided by ADI.
[0144] Offline estimation using traditional linear algorithms such as LMS and .
[0145] The notch filtering Fxlms algorithm was ported to the ADSP21565 audio processor, and the FIR, vector, and matrix operations involved were optimized using SIMD instructions.
[0146] At time n, acquire the real-time engine speed signal and construct... The order noise is [number], and the real-time engine speed can be obtained via the CAN bus. The sampling rate samples the order noise to obtain... noise signal , , , … , These constitute the reference vector. .
[0147] Let the filter vector be... ,Will and Inner product, we get A 24-fold upsampling was performed as the final secondary noise. It is played out through the speaker.
[0148] go through Filter, to obtain , go through Filter, to obtain .
[0149] Due to the sampling rate of the audio system Therefore, from time n-1 to time n, the physical microphone collected a total of 24 data points. These data points were downsampled by a factor of 24 to obtain... .
[0150] Calculate the noise level of the physical target at the physical microphone. .
[0151] Will Input RNN model The noise level of the virtual target at the virtual microphone is estimated. .
[0152] Calculate the virtual residual noise at the virtual microphone. .
[0153] A noise signal passes through The filter yields a new reference vector. This step uses This implementation case only uses one filter, which is also the only one used in this case. Modeling with RNN models, and for and The reason for using the traditional MA model is that the RNN model requires too much computation. The number of RNNs used is too large, and if the audio processor also uses the RNN model, the computing power will be insufficient to support it.
[0154] Application formula renew .
[0155] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
[0156] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An offline estimation method for the nonlinear transfer function of active noise reduction in automobiles based on RNN, characterized in that, Includes the following steps: Includes the following steps: Step 1: Place physical microphones in the target noise reduction area inside the vehicle and place secondary speakers at preset positions on the vehicle body; Step 2: Control the secondary speaker to play white noise signal, and simultaneously collect noise signal through error microphone to build a synchronous audio acquisition and playback system. Perform downsampling operation on the acquired data to adapt to the target noise reduction frequency band. Step 3: Normalize the downsampled audio data to make the data range fit the processing requirements of the neural network activation function; Step 4: Divide the preprocessed dataset into training, validation, and test sets in a 4:2:2 ratio; Step 5: Set up a single-input, single-output RNN model structure, using a single hidden layer, and determine the core parameters such as the hidden layer size and learning rate through experiments and debugging; Step 6: Construct LSTM and GRU models based on the machine learning framework, and iteratively train them on the training set using the mean squared error loss function and the Adam optimizer. Select the model parameters with the minimum loss value on the validation set. Step 7: Test the LSTM or GRU model with optimal parameters on the test set, and evaluate the transfer function estimation performance by plotting the spectrum. Step 8: Implement the various computation modules of the LSTM and GRU models using C language, and complete the basic operations of the corresponding gating and memory units; Step 9: Using the audio processor's accompanying instructions, perform matrix operations on the gating and memory units corresponding to the two types of model memory sequences; Step 10: Implement the activation functions for the corresponding gating and memory units of the model, and complete the calculation of the gating value; Step 11: Obtain the hidden layer output of the LSTM or GRU model according to the preset logic; Step 12: Update the memory sequences or memory units of the two types of models according to the specific formula; Step 13: Combine the output layer weights and bias parameters to complete the final calculation of the model's output layer; Step Fourteen: Perform denormalization on the model output data to restore the characteristics of the real acoustic data; Step 15: Use dedicated instructions or hardware accelerators from the audio processor to perform model matrix operations, and deploy the model to the in-vehicle audio DSP to ensure the real-time performance of the noise reduction system; Finally, the trained and deployed RNN model is embedded into the traditional active noise reduction algorithm, replacing the linear transfer function model in the original algorithm.
2. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, The physical microphone mentioned in step one is placed near the seat headrest, or at the A-pillar or C-pillar of the car. The secondary speaker is placed in the door, trunk, or roof. The data acquisition process in step two is completed in a semi-anechoic chamber.
3. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, In step two, the original sampling rate of the audio acquisition is 48kHz, the target frequency band for active noise reduction is below 500Hz, the downsampling factor is 24 times, and the actual working sampling rate of the noise reduction system after model deployment is 2kHz; the audio acquisition and playback system includes ADI's ADSP21565 audio processing platform, TI's TAS6424 power amplifier, TI's PCM6240 ADC, and automotive-grade electret analog microphone.
4. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, The normalization process described in step three maps the data to the interval [-1,1], and the appropriate activation functions are the sigmoid function and the tanh function. The denormalization process is the inverse operation of normalization.
5. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, The machine learning framework mentioned in step six is PyTorch. The LSTM model is divided into an LSTM layer and an output layer. The LSTM layer contains the input gate, forget gate, output gate, and weights and bias parameters of the memory unit corresponding to the input sequence and the memory sequence. The GRU model is divided into a GRU layer and an output layer. The GRU layer contains the reset gate, update gate, and new gate weights and bias parameters corresponding to the input sequence and the memory sequence. The output layer parameters of the two types of models are the same.
6. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, In step eight, the LSTM model input sequence correspondence operation is implemented using ADI's vecsmltf and vecsaddf instructions. In step nine, the memory sequence correspondence operation is implemented using ADI's matmmltf and vecvaddf instructions. In step eleven, the LSTM layer point-to-point product operation is implemented using ADI's vecvmltf instruction.
7. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, In step ten, the input gate, forget gate, and output gate of the LSTM model use the sigmoid activation function, and the memory unit uses the tanh activation function; the reset gate and update gate of the GRU model use the sigmoid activation function, and the new gate uses the tanh activation function.
8. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, The special instructions mentioned in step 15 are SIMD instructions, and matrix operations are not implemented using a pure CPU approach to avoid failing to meet the real-time requirements of the ANC system.
9. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, In the single-channel passenger vehicle engine noise reduction system, only the acoustic path transfer function of the remote microphone is replaced with the RNN model. The secondary path and virtual microphone path transfer functions are modeled using the traditional MA model. At the same time, the real-time engine speed signal is obtained through the CAN bus to construct an order noise reference vector. The noise reduction filter coefficients are iteratively updated by combining the notch filter FxLMS algorithm.
10. The offline estimation method for the nonlinear transfer function of active vehicle noise reduction based on RNN as described in claim 1, characterized in that, The GRU model is more suitable for automotive real-time embedded systems than the LSTM model due to its simpler structure and smaller memory footprint; moreover, the new gate calculation formula of the GRU model is adapted to the parameter characteristics of the PyTorch framework, which differs from the classic GRU calculation formula.