Disclosure of Invention
The invention aims to provide a power amplifier distortion compensation system based on deep learning so as to solve the problems in the background technology.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a deep learning based power amplifier distortion compensation system comprising:
The input signal acquisition module is used for acquiring an analog audio signal and converting the analog audio signal into a digital signal through the analog-to-digital converter to obtain an audio digital signal;
The deep learning distortion recognition module is used for analyzing the audio digital signal by adopting a deep learning model, recognizing the distortion type generated by the power amplifier and generating corresponding distortion compensation parameters;
the electronic tube simulation module is used for adding even harmonic characteristics generated by the simulation electronic tube to the audio digital signal to generate an enhancement signal;
The distortion compensation module is used for processing the enhanced signal based on the distortion compensation parameter, eliminating distortion and restoring the original characteristic of the audio signal to generate a repair signal;
the PWM generation and optimization module is used for converting the repair signal into a pulse width modulation signal for power amplification;
the power amplification module is used for amplifying the pulse width modulation signal and driving a loudspeaker to sound so as to output an audio signal;
And the feedback learning module is used for collecting the audio signals output by the loudspeaker, comparing the audio signals with the audio digital signals and generating feedback data for optimizing the distortion compensation capacity of the deep learning model.
Preferably, the deep learning distortion recognition module performs distortion feature extraction by adopting a multi-band dynamic feature extraction algorithm, and generates distortion compensation parameters based on frequency band and dynamic range in a self-adaptive manner.
Preferably, the formula of the multiband dynamic feature extraction algorithm is as follows:
Dk is the distortion degree of the frequency band k;
Xk (t) the amplitude of the original signal in frequency band k;
Target undistorted signal predicted by deep learning;
T is the sampling time window size;
a trade-off term for controlling the contribution of dynamic changes to the degree of distortion;
var (Xk (t)): the dynamic amount of change in frequency band k.
Preferably, the valve simulation module simulates the nonlinear characteristic of the valve in real time through a digital signal processing algorithm, and dynamically generates even harmonics and enhances the tone quality nature of signals by adopting an even harmonic enhancement algorithm.
Preferably, the formula of the even harmonic enhancement algorithm is:
Y(t)=X(t)+β·X2(t)+γ·X4(t)
wherein Y (t) is outputting the enhanced audio signal;
X (t): inputting an audio signal;
And beta, gamma, controlling the weight parameter of the even harmonic intensity, and dynamically adjusting based on deep learning.
Preferably, the distortion compensation module combines the generation countermeasure network to repair the enhanced signal with high precision, and dynamically compensates harmonic distortion and noise distortion.
Preferably, the formula for generating the countermeasure network is:
Generator objective function:
LG=-Ε[log(D(G(X)))]+λLrec
The arbiter objective function:
LD=-Ε[log(D(X))]-Ε[log(1-D(G(X)))]
The generator is used for repairing the distorted signal;
a discriminator for discriminating the repair signal from the undistorted target signal;
x is an input distortion signal;
lrec reconstructing a loss for constraining a similarity between the repair signal and the target signal;
And lambda is a weight parameter, and controls the influence of the reconstruction loss on the overall objective function.
Preferably, the PWM generation and optimization module optimizes PWM modulation parameters based on deep reinforcement learning;
The formula of the deep reinforcement learning is as follows:
Wherein Q (st, at) is the cost function of performing action at in state st;
Eta is learning rate;
rt, rewarding after executing action;
And gamma, a discount factor, used to balance short-term and long-term benefits.
Preferably, the feedback learning module updates parameters of the deep learning model in real time through an online learning mechanism, adapts to different audio environments and power amplification characteristics, and improves the compensation capability of the system.
Preferably, the formula of the online learning mechanism updated in real time is:
li is the loss function of the ith task;
Weight parameters are used for balancing the loss of each task;
R (Θ): regularization term to prevent overfitting;
Regularized term weights;
Θ -parameters of the deep learning model.
Compared with the prior art, the invention has the beneficial effects that:
(1) The system combines a deep learning algorithm and a multi-band dynamic characteristic extraction method to realize high-precision identification of complex nonlinear distortion types such as harmonic distortion, dynamic distortion and the like, and compared with traditional spectrum analysis or static filter compensation, the system can dynamically adjust a compensation strategy and obviously reduce the influence of distortion on tone quality.
(2) The invention utilizes the valve simulation module, highly restores the natural tone and hearing sense of the audio signal through the nonlinear even harmonic enhancement algorithm, realizes the intelligent restoration of signal distortion through the GAN framework, dynamically generates high-fidelity compensation signals by the generator, and simultaneously learns the characteristics of different distortion types through the discriminator to ensure that the restored signals are close to the undistorted targets.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Embodiment one:
referring to fig. 1, a power amplifier distortion compensation system based on deep learning includes:
the input signal acquisition module is used for acquiring an analog audio signal and converting the analog audio signal into a digital signal through an analog-to-digital converter (ADC) to obtain an audio digital signal;
The deep learning distortion recognition module is used for analyzing the audio digital signal by adopting a deep learning model, recognizing the distortion type generated by the power amplifier and generating corresponding distortion compensation parameters;
the electronic tube simulation module is used for adding even harmonic characteristics generated by the simulation electronic tube to the audio digital signal to generate an enhancement signal;
The distortion compensation module is used for processing the enhanced signal based on the distortion compensation parameter, eliminating distortion and restoring the original characteristic of the audio signal to generate a repair signal;
the PWM generation and optimization module is used for converting the repair signal into a pulse width modulation signal for power amplification;
the power amplification module is used for amplifying the pulse width modulation signal and driving a loudspeaker to sound so as to output an audio signal;
And the feedback learning module is used for collecting the audio signals output by the loudspeaker, comparing the audio signals with the audio digital signals and generating feedback data for optimizing the distortion compensation capacity of the deep learning model.
Specifically, the deep learning distortion recognition module adopts a multi-band dynamic feature extraction algorithm to extract distortion features, and generates distortion compensation parameters based on frequency band and dynamic range in a self-adaptive manner;
the formula of the multi-band dynamic characteristic extraction algorithm is as follows:
Dk is the distortion degree of the frequency band k;
Xk (t) the amplitude of the original signal in frequency band k;
Target undistorted signal predicted by deep learning;
T is the sampling time window size;
a trade-off term for controlling the contribution of dynamic changes to the degree of distortion;
var (Xk (t)): the dynamic variation of frequency band k;
The algorithm can accurately identify nonlinear distortion (harmonic distortion and dynamic distortion) by combining frequency band dynamic change and distortion amplitude deviation, and compared with a traditional spectrum analysis method, the method can adapt to complex structures of different audio signals and adjust compensation strategies in real time.
Specifically, the valve simulation module simulates nonlinear characteristics of a valve in real time through a Digital Signal Processing (DSP) algorithm, and dynamically generates even harmonics and enhances the tone quality naturalness of signals by adopting an even harmonic enhancement algorithm;
The even harmonic enhancement algorithm has the formula:
Y(t)=X(t)+β·X2(t)+γ·X4(t)
wherein Y (t) is outputting the enhanced audio signal;
X (t): inputting an audio signal;
beta, gamma, controlling the weight parameter of even harmonic intensity, and dynamically adjusting based on deep learning;
The algorithm utilizes nonlinear transformation to generate even harmonic waves, enhances the natural sense and expressive force of an audio signal, and compared with a static valve simulation model, the algorithm can realize deep learning of dynamic adjustment parameters beta and gamma and optimize harmonic distribution according to the frequency and amplitude characteristics of the signal.
Specifically, the distortion compensation module combines a generated countermeasure network (GAN) to repair the enhanced signal with high precision, and dynamically compensates harmonic distortion and noise distortion;
The formula for generating the countermeasure network is as follows:
Generator objective function:
LG=-Ε[log(D(G(X)))]+λLrec
The arbiter objective function:
LD=-Ε[log(D(X))]-Ε[log(1-D(G(X)))]
The generator is used for repairing the distorted signal;
a discriminator for discriminating the repair signal from the undistorted target signal;
x is an input distortion signal;
lrec reconstructing a loss for constraining a similarity between the repair signal and the target signal;
Lambda is a weight parameter, and the influence of the reconstruction loss on the overall objective function is controlled;
Through the GAN framework, the system can learn complex distortion characteristics and generate high-quality compensation signals, the reconstruction loss ensures the tone quality fidelity of the repair signals, and meanwhile, distortion amplification caused by excessive compensation is avoided;
The PWM generation and optimization module optimizes PWM modulation parameters based on deep reinforcement learning, and ensures high fidelity and low distortion of a pulse width modulation signal;
The formula of the deep reinforcement learning is as follows:
Wherein Q (st, at) is the cost function of performing action at in state st;
Eta is learning rate;
rt, rewarding after executing action;
a discount factor for balancing short-term and long-term benefits;
and the PWM modulation parameters are optimized by reinforcement learning, so that high-fidelity output of the modulation signal under the condition of complex audio frequency is ensured. Compared with the traditional static modulation strategy, the method can dynamically adapt to the audio characteristics, improve the system efficiency and reduce the harmonic distortion.
Specifically, the feedback learning module updates parameters of the deep learning model in real time through an online learning mechanism, adapts to different audio environments and power amplification characteristics, and improves the compensation capability of the system;
the formula of the online learning mechanism updated in real time is as follows:
wherein Li is the loss function of the ith task (such as distortion classification and compensation parameter generation);
Weight parameters are used for balancing the loss of each task;
R (Θ): regularization term to prevent overfitting;
Regularized term weights;
parameters of the deep learning model;
Through multi-task learning and online learning mechanism, the system can optimize a plurality of tasks such as distortion classification, compensation parameter generation and the like at the same time, and the model adaptability is improved by utilizing real-time feedback data. Compared with a single-task learning method, the algorithm has stronger generalization capability.
The system combines a deep learning algorithm and a multi-band dynamic characteristic extraction method, realizes high-precision identification of complex nonlinear distortion types such as harmonic distortion, dynamic distortion and the like, and can dynamically adjust a compensation strategy and obviously reduce the influence of distortion on tone quality compared with the traditional spectrum analysis or static filter compensation;
The electronic tube simulation module is utilized, natural tone and auditory sense of an audio signal are restored highly through a nonlinear even harmonic enhancement algorithm, intelligent restoration of signal distortion is realized through a GAN framework, a generator dynamically generates high-fidelity compensation signals, meanwhile, characteristics of different distortion types are learned through a discriminator, and the restored signals are ensured to be close to a distortion-free target. The mechanism has strong adaptability and generalization capability, and can process various complex audio scenes;
The PWM modulation parameters are optimized through reinforcement learning, so that the signal still maintains low harmonic distortion and high signal to noise ratio when amplified at high power, and model parameters are dynamically updated in the use process through the real-time feedback learning module, so that the model parameters are continuously adapted to environmental changes and user requirements. In addition, the system has excellent effects in aspects of harmonic distortion control, signal-to-noise ratio improvement, dynamic range expansion and the like, and various audio processing requirements from high-fidelity sound to field performance are comprehensively met.
Embodiment two:
the design is particularly applied to power amplifier distortion compensation in a high-fidelity household sound system;
Further, the system composition and parameter configuration:
Input signal acquisition module
Sampling rate of 96kHz
Quantization accuracy 24b it
Input signal analog audio (20 Hz-20 kHz)
Deep learning distortion recognition module
5-Layer convolution+2-layer full connectivity using a Convolutional Neural Network (CNN) model
Training data comprising 50 ten thousand pieces of audio data with different distortion types
Parameter configuration dynamically adjusting distortion compensation weights (α=0.5)
Valve simulation module
Even harmonic parameters:
β=0.03,γ=0.002
analog signal-signal enhancement tone using an adaptive harmonic algorithm.
Distortion compensation module
GAN model structure generator (6-layer convolution+ReLU) and discriminant (4-layer convolution+SimgId)
Reconstruction loss weight λ=10
And as a repair result, the harmonic distortion is reduced to 2% of the original harmonic distortion.
PWM generation and optimization module
PWM modulation frequency 400kHz
Reinforcement learning optimization, γ=0.9, learning rate η=0.01
Feedback learning module
Real-time feedback interval, optimizing model parameters every 5 minutes
Task weight distortion classification (ω1=0.6), compensation parameter generation (ω2=0.4)
Test data and effects
Test environment, 20 square meter living room, speaker frequency response range is 30Hz-22kHz
Input signal high fidelity audio file (distortion-free reference standard)
Output Signal measurement Using an Audio Analyzer (distortion degree, frequency response)
As shown in Table 1 below
| Test item | Before optimization | After optimization |
| Total Harmonic Distortion (THD) | 3.5% | 0.5% |
| Signal to noise ratio (SNR) | 85dB | 96dB |
| Degree of timbre reduction | 80% | 98% |
| User satisfaction | Medium high | Extremely high |
TABLE 1
From the above, by implementing the system, the tone quality of the high-fidelity audio equipment is greatly improved, the distortion sense is obviously reduced, and the performance feedback of the user on the bass and the middle-high pitch is more natural.
Embodiment III:
Another aspect of the design is applied to power amplifier distortion compensation in live performance audio processing;
wherein, system composition and parameter configuration:
Input signal acquisition module
Sample rate 48kHz
Quantization accuracy 16b it
Input Signal in-situ mixing Audio Signal (dynamic Range is larger)
Deep learning distortion recognition module
Using transducer models (transducers)
Training data, including common audio distortion samples of 10 ten thousand live performances
Parameter configuration dynamic Range compression ratio α=0.7
Valve simulation module
Even harmonic parameters:
β=0.05,γ=0.005
And the distortion characteristic of a real electron tube is simulated, and the medium frequency expressive force is enhanced.
Distortion compensation module
GAN model structure generator (7-layer convolution + BatchNorm), arbiter (3-layer full connection +dropout) reconstruction loss weight λ=5
The restoration result is that the dynamic distortion is reduced to 1%.
PWM generation and optimization module
PWM modulation frequency 500kHz
Reinforcement learning optimization, γ=0.8, learning rate η=0.02
Feedback learning module
Real-time feedback interval optimizing model parameters task weights every 30 seconds: distortion classification (ω1=0.5), compensation parameter generation (ω2=0.5)
Test data and effect test environment 500 persons medium-sized demonstration sites, the maximum output power of the power amplifier is 1000W
Input Signal Multi-track mixing input Signal (Drum, guitar, human Sound, bass)
Output Signal measurement Using site Audio test equipment for frequency response and distortion detection
As shown in Table 2 below
| Test item | Before optimization | After optimization |
| Total Harmonic Distortion (THD) | 7.0% | 1.0% |
| Signal to noise ratio (SNR) | 75dB | 88dB |
| Sound pressure level uniformity | ±6dB | ±2dB |
| User satisfaction | Medium and medium | High height |
TABLE 2
From the above, the system effectively solves the problem of dynamic distortion common in on-site high-power amplification, optimizes sound uniformity and dynamic performance, particularly has prominent performance in the reverberation processing of human voice and musical instruments, and greatly improves the hearing experience of audiences.
In the description of the present specification, a description referring to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily for the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
In the drawings of the disclosed embodiments, only the structures related to the embodiments of the present disclosure are referred to, and other structures may refer to the general design, so that the same embodiment and different embodiments of the present disclosure may be combined with each other without conflict.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.